I am in need of a loop that can generate 2 arrays based on some data...
To start, I create the following 2 arrays:
namelist = [];
countList = [];
{
"id": "665",
"name": "primary",
"contents": {
"692": {
"id": "692",
"title": "title 1",
"info": {
"quantity": 8
}
},
"757": {
"id": "757",
"title": "title 2",
"info": {
"quantity": 15
}
}
}
}
In this scenario, the intended outcome would be:
For namelist:
['title 1', 'title 2']
And for countList:
[8, 15]
How should I approach achieving this?