After making an AJAX request to a JSON, I receive the following code as a response:
{
total: "1",
items: [
{
id: 43,
title: "ThisIsTheTitle",
promoted: false,
sticky: false,
weight: 10,
created: {
timestamp: 1482054,
formatted: "17/01/2017"
},
url: "http://...",
airdate: {
timestamp: 1484980,
formatted: "17/01/2017"
},
video: {
id: 43,
number_of_views: 1,
duration: {
seconds: 50,
formatted: "00:00"
},
required_login: false
},
program: {
id: 25,
url: "http://...",
title: "ProgrammaTitel"
},
image: {
uri: "public://...",
full: "http://..."
},
tags: [
{
id: "4",
name: "Map"
},
{
id: "7",
name: "Aflevering2"
}
]
}
]
}
I then store this data in my own JSArray. It's important to note that currently there is only one response item, but more will be added later.
My objective is to extract specific object data based on the tag name of the object
(item > tags > name = 'Aflevering2')
Essentially, I am looking to retrieve the data from the object that has the tag name 'Aflevering2'
.
Any suggestions or advice on how to achieve this? Thank you!