while review a javascript coding, i saw that
var detailInf = {
"hTitle":"Results",
"hMark":"98"
};
What’s the concept behind this js coding. While give alert for the variable its shows as “[object Object]”. So this is an object, then how can we access the variable and reveal the data from this object.
That’s an object in JSON format. That’s a javascript object literal. Basically, the bits to the left of the:‘s are the property names, and the bits to the right are the property values. So, what you have there is a variable calleddetailInf, that has two properties,hTitleandhMark.hTitle‘s value is Results,hMark‘s value is 98.Edit Paolo’s answer is better 🙂