alert(this.id); // works - displays woodbury when I click on woodbury alert(obj.woodbury['xAv']); // works - displays xAv info that pertains to woodbury when clicked alert(obj.this.id['xAv']); // does not work when clicked Code (markup): obj is a json decoded var (not sure if that's relevant). Help?
what do you get with console.log(this); Code (markup): I've found that normally dumps the object into the console and makes it easier to see how the data is structured.
...and provide more code please. What to be clicked? Just a guess then: assuming that obj.woodbury['xAv'] is the right syntax, then the same value can also be achieved with obj['woodbury']['xAv'] or in other word.... obj[this.id]['xAv'] ???
console.log gave me pretty much the same feedback as the alerts, but it did add a note saying that 'name was not identified after .' For a lark I tried removing the dot after obj - alert(obj[this.id]['xAv']) and it worked. Yeah! =) Thanks for your feedback. I must have tried 100 different variants (might be an exaggeration) and then over again. =)
Yeah, that was the ticket. Wish I'd read that before bouncing my head off the wall another hour or so. =)