Please teach a great god, no appreciate,
{" time ": {" 2020-02-08" : {" A ": 200," B ": 400," C ": 150, the" D ": 360}}}

CodePudding user response:
var s=` {" time ": {" 2020-02-08" : {" A ": 200," B ": 400," C ": 150, the" D ": 360}}} `;
S=` (${s}) `;
Var obj=eval (s);
Var {A, B, C, D}=obj. Time (" 2020-02-08 ");
The console. The log (A, B, C, D);
CodePudding user response:
Sometimes will suddenly stupid head ha, the answer is better:var json `={" time ": {" 2020-02-08" : {" A ": 200," B ": 400," C ": 150, the" D ": 360}}} `;
Var obj=JSON. Parse (JSON);
Var {A, B, C, D}=obj. Time (" 2020-02-08 ");
The console. The log (" as you can see: ", A, B, C, D);
CodePudding user response:
var s='{" time ": {" 2020-02-08" : {" A ": 200," B ": 400," C ": 150, the" D ": 360}}}';
The eval (" var obj="+ s);
Var a=obj. Time [r]. "the 2020-02-08" a;
Alert (a);
CodePudding user response:
Great god or more ah, gives so much so quickly the correct answer, thank you,