Is there a guide somewhere showing how to parse JSON and use it? I'm not trying to do anything complex, just looking for the syntax to get the values from a few different objects in the JSON as well as some sub-array's. Lets say the JSON was a tennis match that looked something like:
Code:
{
"scores": {
"players": [
[
{
"name": "Fred Flintstone",
"team": "Team Fred"
}
] ,
[
{
"name": "Barney Rubble",
"team": "Team Barney"
}
]
],
"gamescore": {
"player1": "30",
"player2": "15"
},
"setscore": [
{
"player1": "6",
"player2": "1"
},
{
"player1": "1",
"player2": "3"
}
]
}
}
Now I just want to parse up the players and scores to be able to place them in an html table but don't know how to grab player 1 name, player 2 name, player 1 game score, player 2 game score, and then scores from each set (up to 5) and have them all as variables to be put into an html table. Hoping there's a guide to show me this or an example or video or something.