想要获取 json 变量中的值….

var employees = [
{ "firstName":"Bill" , "lastName":"Gates" },
{ "firstName":"George" , "lastName":"Bush" },
{ "firstName":"Thomas" , "lastName": "Carter" }
];

查询 json 内容

employees[0].lastName;
→ Gates

修改 json 内容

employees[0].lastName = "Jobs";