2015年10月31日
json
{"firstName":"John"} //示例1:此示例使用 JSON.parse 将 JSON 字符串转换为对象
var jsontext = '{"firstname":"Jesper","surname":"Aaberg","phone":["555-0100","555-0120"]}';
var contact = JSON.parse(jsontext);
document.write(contact.surname + ", " + contact.firstname + ", "+ contact.phone);Last updated