{
"elements":[{
"content":{
"xyz-media:game":{
"display_name":"Pool Practice",
"enable_video_ad":true,
}
},
{
"content":{
"xyz-media:game":{
"display_name":"Bouncing Balls: Christmas Edition",
"enable_video_ad":true,
}
},
]
}
How do i parse this JSON String? I have been trying this for last 2 days without any luck. Below is the code that I have been trying.
//where r.responseText is the Response from URL
messages = JSON.parse(r.responseText);
//To access the display_name of first content
messages.elements[0].content[0].display_name
Please tell me where am i going wrong?