Here's a handy site that makes viewing the JSON data far easier: jsonviewer. Paste the JSON text in then click the "Viewer" button at the very top


Now lets say you want to access various items in the br mode's data, all you have to do is make a call to $json for each piece of data you want to retrieve:

Code
alias example {
  ;; ... code that retrieves the json and parses it

  ;; assume the JSON handler's name is stored in %stats


  ;; echos: BR Wins: 76
  echo -ag BR Wins: $json(%stats, data, lifetime, mode, br, properties, wins).value 

  ;; echos: BR Kills: 10843
  echo -ag BR Kills: $json(%stats, data, lifetime, mode, br, properties, kills).value

  ;; Or if you want both on the same line
  ;; echos: BR Wins: 76 - BR Kills: 10843
  echo -ag BR Wins: $json(%stats, data, lifetime, mode, br, properties, wins).value - BR Kills: $json(%stats, data, lifetime, mode, br, properties, kills).value
}

Last edited by FroggieDaFrog; 22/10/20 04:44 AM.

I am SReject
My Stuff