I am not lying I am a beginner. So here is my issue. I am receiving a json object in an ajax request and would like to loop its content. I need to create the loop and gather data within the variable "pins."
function(data) {
var pins = [
{
"lat": data.lat,
"lon": data.lon,
"imageURL": data.imageURL,
"title": data.title,
"subTitle": data.subTitle,
"pinColor": data.pinColor,
"selected": data.selected,
"pinImage": data.pinImage,
"index": data.index
}
];
}
Data is an object and I would like to loop every single element using jQuery.
Thanks
{and}means it contains an object and[and]means it contains an array. Hencepinsis an array of objects.