I have an Ajax call which returns a JSON response and i'm loading the response using an array
var results = {
"appointmentrequired": {"name": "Appointment Required?"},
};
success: function(data) {
$.each(results, function(key, value) {
// show results from `data` here
});
}
But I'm not sure how to access the results inside the array loop.
I've tried
console.log(data[key]);
console.log(data.key);
But both return undefined