Hello
I am trying to figure out the code for getting player stats in cloudscript.
If the Result is below:
"Statistics":[{"StatisticName":"Points","Value":570,"Version":1}
then it appears that there is no key/Value pair as in with the titledata scenario
normally for titledata i would separate the KEY/VALUE PAIRS and i can iterate through them.
I cant do this here because the structure of the result
HTTP/1.1 200 OK Content-Type: application/json; charset=utf-8 { "code": 200, "status": "OK", "data": { "PlayFabId": "621EF2023753444", "Statistics": [ { "StatisticName": "Points", "Value": 570, "Version": 1 }, { "StatisticName": "Wins", "Value": 15, "Version": 0 } ] } }var specificSTATVALUE = JSON.parse(myResult.Statistics["Points"]);
specificSTATVALUE would = 570
Do you guys have any documentation/tutorials/examples that worked around this without having to do something like iterate through each and compare the statistic name and get the Value from that condition being met?
thank you!