javascript - How to access json elements -


i have variable soap looks

{   "soapenv:head":{       "title": "titlename"   },   "soapenv:body":{       "element1": "elementname"   } } 

how can access soapenv:body? having unexpected token : while trying

soap.soapenv:body

since have special char : in key-name, should use this:

soap["soapenv:body"] 

Comments

Popular posts from this blog

searchKeyword not working in AngularJS filter -

sequelize.js - Sequelize: sort by enum cases -

user interface - how to replace an ongoing process of image capture from another process call over the same ImageLabel in python's GUI TKinter -