var obj = JSON.parse("total(PC+CH)":"50", "Name":"Doe"}');
document.getElementById("demo").innerHTML = obj.total(PC+CH);
Here is the json which has some special characters like +
and ()
. But unable to access the element value using total(PC+CH)
since it has some special characters.
How can we get the value of total(PC+CH)
?
NOTE: I dont want to use indexing, i want to use total(PC+CH)
and get the value