Skip to content

Instantly share code, notes, and snippets.

@chapel
Created October 17, 2010 15:12
Show Gist options
  • Save chapel/630933 to your computer and use it in GitHub Desktop.
Save chapel/630933 to your computer and use it in GitHub Desktop.
{"players":
{
"gamertag": [ //gamertag would be set inside the loop through a variable, like "chapel" or "awesome"
{
"rating": 1234,
"standing": 1
}
],
"chapel": [
{
"rating": 2345,
"standing": 2
}
]
}
}
@shripadk
Copy link

Ok i don't really know anything about data so i will assume here:

        var gamertag = player.PlayerDetail.gamertag,
                rating = player.Rating,
                standing = player.IndividualStandingWithNoRegardForTeams;

    var data = {"players": {gamertag: []}}; // Assumed!

    data.players.gamertag.push({"rating": rating, "standing": standing})

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment