I have the following json data in a Javascript variable result:
[
Object { id="3443", name="Jack", date3="261"},
Object { id="50942", name="Mary", date1="12"},
Object { id="2524", name="Paul", date3="163"}
]
How can I access the name and dates values with Javascript?
The json data is produced by a php script I wrote. I am not sure how to be able to name the ‘ojbect’ which might actually help.
After reading the first comments I realized I actually forgot to use jsonencode before sending the data. So the object above was a php array and not a json encoded object.
try: