I'm running through a building elements on a Google map. For the most part it works fine, but I can't seem to access the name of custrecord_image or custrecord_icon URLs without getting an error. Based on what I've read, the syntax would be as follows:

And to add an extra level of weirdness, when I just build the JSON as a string locally and test it, everything works fine. But, when it's returned from the server, it produces the error. Also, accessing custrecord_itemsused with the following syntax works fine:

Any idea what's going on here? Any help provided would me much appreciated. Thanks!

jacobdesch

OK, I figured it out. It turns out, on one of the nodes in the JSON, custrecord_image wasn't being defined, which was causing the error. But, that now raises another question. If it's undefined on definition of the variable that's pulling from JSON, how do I stop it from doing throwing an error?