I have a json structure like this
[
{
“id” : 1,
“user_id” : 1,
“location” : {
“long” : 34.2489234,
“lat” : -117.234234,
},
“active” : 1
}, {
“id” : 2,
“user_id” : 2,
“location” : {
“long” : 34.245234234,
“lat” : -116.23786834,
},
“active” : 1
}, {
“id” : 3,
“user_id” : 3,
“location” : {
“long” : 34.245634234,
“lat” : -114.237787834,
},
“active” : 0
}
]
how can i loop through the data so i would only get the location "long" and "lat"?