This is my code:
$.ajax({ url: \"some_url/\", type: \"GET\", dataType: \"json\", success: function(data){ console.log(data);
just check for either it is string or JSOn array
if(typeof(data) === "string"){data = JSON.parse(data)} data.forEach(function(element){ console.log(element); });