Hi everyone!
I would like to read the data inside this JSON result that I have, using MiniJSON from Facebook.
{
"name": "Jake",
"feed": {
"data": [
{
"message": "Hello! ! ♡",
"story": "Jake with Mike and 2 others",
"id": "872470432869642_843613872446638",
"likes": {
"data": [
{
"name": "Jake",
"id": "10207764200433902"
},
{
"name": "Isabelle",
"id": "1686428204976478"
},
{
"name": "Lilou",
"id": "1656097109833376"
}
],
"paging": {
"cursors": {
"after": "MTAyMLc3NDUwMTIxMjY5NDE=",
"before": "MTAyMDc3NjQyMRT0NDg4MDI="
}
}
}
},
{
"message": "10 days left",
"story": "Jake added 18 new photos to the album: Danemark.",
"id": "10207764200448802_10207209973799955",
"likes": {
"data": [
{
"name": "Josh",
"id": "10153051797757583"
},
{
"name": "Margot",
"id": "10207939314652242"
},
{
"name": "Iph",
"id": "997937874371968"
},
{
"name": "Prak",
"id": "994293789622585"
},
{
"name": "Din",
"id": "936043453109169"
},
{
"name": "John",
"id": "1040879992694764"
}
],
"paging": {
"cursors": {
"after": "MTAyMDc1KOkzODYzNzM0MzU=",
"before": "MTAxNPLwNTE3OTg3NzE1ODM="
}
}
}
},
{
"message": "One year in Danemark...",
"story": "Jake added 13 new photos to the album: Danemark - 2014/2015.",
"id": "10207764200489002_10207889154588063",
"likes": {
"data": [
{
"name": "Marc",
"id": "10206559113890318"
},
{
"name": "Carole",
"id": "10153801245882446"
}
],
"paging": {
"cursors": {
"after": "NzgyNjUxJUH1MTc4NDMy",
"before": "MTAyMDY1KLkxMTMzNTQzMTg="
},
"next": "https://graph.facebook.com/v2.4/1407536054_10207112154588063/likes?fields=name&access_token=CAAHTUph3fVkBAKHKoabXah0bdD3BT6Ai0ZCmoxdFeoQyOH7T5HKlJ3uHcPGUxNChCVz6Uo7LlIDtOLuy7LmsmnoZAaNZB5WLxH0m6KtHinpUTZAp5JzwZBERNZASZAZCu21fVyeA6oO426RmQ6NZCczz8jKYTLJxVeaJZC3tKVI6MecON6LKwMIeBpNPDBhX6rvtioQN4x77oKngZDZD&limit=25&after=NzgyNjUxMDU1MTc4NDMy"
}
}
}
]
}
}
(I got this JSON from Facebook Graph API. Basically, there is three posts, and the usernames of the persons who liked each of them)
My problem is : I can access to the data for each post (like “message” or “story”), because it’s in the array “data” of the key “feed”, BUT I cannot access the infos of the “likes” array, probably because it’s kind of an array inside an array…
Any idea of how I can access it?
Thank you (I can post more of my code if needed, I just didn’t want to overload this thread).