0👍
✅
From the code you’ve written, your JSON should be formatted like this:
{
"citylist": [
{
"cityname": "Valletta",
"index": 13
},
{
"cityname": "Valletta",
"index": 13
},
...
]
}
The method that sets citylist is fine, it’s the format of the JSON that is throwing you off.
Source:stackexchange.com