Tuesday, April 21, 2015

jquery get json data by id


var data = {

"users": [



{

"firstName": "Ray",

"lastName": "Villalobos",

"joined": 2012



},

{

"firstName": "John",

"lastName": "Jones",

"joined": 2010



}

]

}

alert(data.users[1].firstName + " " + data.users[1].lastName + " " + data.users[1].joined);

No comments:

Post a Comment