Good to know. Thanks.
--
You received this message because you are subscribed to the Google Groups
Prototype script.aculo.us group.
To post to this group, send email to prototype-scriptaculous@googlegroups.com.
To unsubscribe from this group, send email to
Hey there,
json[@attributes]id // this doesn't work ;-)
Identifiers in JS cannot start with an @ ($ and _ are allowed), but
you can access them using:
json.points[0][@attributes]
Ciao,
Marc
On Mar 30, 7:35 am, kstubs kst...@gmail.com wrote:
I'm getting json back from an ajax request
In Javascript, you can always use the array-name[expression] form,
such as json.points['@attributes'];
The array-name.id form is precisely equivalent to array-name[id]
*provided id is a valid javascript identifier*. Otherwise the latter
is invalid.
Colin
--
You received this message because