ParseJSON returning you an object from your AJAX Call, the problem that I have is my object properties has invalid character (e.g “#”)
Assuming jsonData is my variable that contains the following information
I’d like to grab the property of “#innerxml”
Normally I can do this to get the property of an object but in this case I can’t due to invalid character
(jQuery.parseJSON(jsonData)[0]).#innerxml
So How do I access an object which has properties where one of the property name is using an invalid character (e.g “#”)
I can access with the following style
(jQuery.parseJSON(jsonData)[0])[‘#innerxml’]
Leave a Reply