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

assembly - 8086 TASM: Illegal Indexing Mode -

Java, LWJGL, OpenGL 1.1, decoding BufferedImage to Bytebuffer and binding to OpenGL across classes -

java - SmsManager sending message more than one -