The API I’m given has the method called leaderboard (http://127.0.0.1/leaderboard) and it returns a JSON Array in the following format (they are ordered by score):
[
{
"name": "Charming Sir",
"character": "Ram",
"score": 322
},
{
"name": "Golden Shark",
"character": "Gold",
"score": 0
},
{
"name": "Frostie Snowman",
"character": "Frost",
"score": 0
}
]
I need to take that JSON and somehow parse it to array, take the first 5 results and change the 5 Texts I have placed in the Widget to their names.
I don’t want anything more complicated like using lists or changing the API since I’m provided with that API and can’t change anything.
Here are some screenshots of what I have