These are ii validated JSON objects:
I am trying to discovery the value for the minute JSON object:
The code shown at the halt industrial plant in addition to provides a value of 2.85
----------------------
var jobj2={"tuesday":"2.85"};
alert(jobj2.tuesday );//---alerts 2.85
------------------------------------
If I operate the exact code that I used for recovering the value for the source JSON object, I halt upward alongside an error.
---------------
var obj2={"70":"27.4"};
alert(obj2.70);//--spawns an error
--------------------
The piece of work some which I guessed that would piece of work for the source object provides the value 27.4
var x;
x=70;
var obj={"x":"27.4"};
alert(obj.x);----//alerts 27.4
---------------------------------------
If yous desire to accept a look, simply accept out the relevant comments in addition to run. There could live on a amend agency of resolving this rather than re-formatting the question.
I am trying to discovery the value for the minute JSON object:
The code shown at the halt industrial plant in addition to provides a value of 2.85
----------------------
var jobj2={"tuesday":"2.85"};
alert(jobj2.tuesday );//---alerts 2.85
------------------------------------
If I operate the exact code that I used for recovering the value for the source JSON object, I halt upward alongside an error.
---------------
var obj2={"70":"27.4"};
alert(obj2.70);//--spawns an error
--------------------
The piece of work some which I guessed that would piece of work for the source object provides the value 27.4
var x;
x=70;
var obj={"x":"27.4"};
alert(obj.x);----//alerts 27.4
---------------------------------------
If yous desire to accept a look, simply accept out the relevant comments in addition to run. There could live on a amend agency of resolving this rather than re-formatting the question.
Komentar
Posting Komentar