I am getting the variable from a json file that is
var node = data.nodes;
alert(node); returns the following
[{"name" : "30","group": 0} , {"name" : "40","group": 0} ]
which is not an Object
If I assign this value directly to a variable then it is counted as object as you can see below.
var node = [{"name" : "30","group": 0} , {"name" : "40","group": 0} ]
Why is the value not an Object in the first place? What can I do to convert the variable to an Object?
any help would be truly appreciated.