I have created a script to call a page, which returns a list of date strings via JSON. How do i add these dates to an array that i've created?
var bookedDates= [];
$(document).ready(function () {
$.ajax({
url: "/Ajax/getBooked",
data: "{}",
contentType: "application/json; charset=utf-8",
dataType: "json",
success: function (response) {
alert("success");
//Add results to list here?
}
});
});
Any help would be greatly appreciated (i'm new to javascript).
Thanks.