JSON 解析
var jsondata = {"staff":[{"name":"红旗","age":"20"},{"name":"郭靖","age":"100"}]};
alert(jsondata.staff[0].name)
undefined
var jsondata = {"staff":[{"name":"红旗","age":"20"},{"name":"郭靖","age":"100"}]};
var jsonobj = parse('(' + jsondata +')');
alert(jsonobj.staff[0].name);
VM649:3 Uncaught ReferenceError: parse is not defined
at <anonymous>:3:1
at Object.InjectedScript._evaluateOn (<anonymous>:895:140)
at Object.InjectedScript._evaluateAndWrap (<anonymous>:828:34)
at Object.InjectedScript.evaluate (<anonymous>:694:21)
为什么没有第二句是对的,有了第二句就错了