Added ", "don't know what reason cause behind d.r ows [0] [" SaleTotal"] how also can not get the value of the inside, then put a piece of code var e=JSON. Parse (d); To convert d after they get, above:
Workplace small white, and what a great god tell me why the value of the much more difficult to express "", I ajax in another function to get the value of the works, the background code is the same, no problem
CodePudding user response:
With or without the quotation marks can define your own, but JSON format specification is {" key ":" value "}, is to bring the double quotes, as far as possible in accordance with the specification doCodePudding user response:
Json string turn json objectVar STR="{id: 1, name: 'test 1}"
Var obj=JSON. Parse (STR);
The console. The log (obj)//{id: 1, name: 'test 1}
The console. The log (obj. Id)//1