javascript - Displaying JSON content -


this should pretty simple, i'm pretty new this. want know how how display following information file: http://worldoftanks.com/community/accounts/1003576349/api/1.8/?source_token=wg-wot_assistant-1.3.2

i want display (for example purposes) following using javascript:

  • -status
  • -vehicles -> spotted
  • -summary -> wins
  • -data -> defender

thanks help!

just deal json normal javascript object , access properties/ arrays other object. can values looking this. fiddle

var json={...yourjson...}; alert('status ' + json.status); alert('spotted ' + json.data.vehicles[0].spotted); alert('wins ' + json.data.summary.wins); alert('defender ' + json.data.achievements.defender); 

for further dwelling @ so post.


Comments

Popular posts from this blog

c# - Send Image in Json : 400 Bad request -

jquery - Fancybox - apply a function to several elements -

An easy way to program an Android keyboard layout app -