1

I have a JSON Structure like this:

{
"SOAP: Envelope": {
    "SOAP: Header": "",
    "xmlns: SOAP": "http: //schemas.xmlsoap.org/soap/envelope/",
    "SOAP: Body": {
        "ns0: Z_ZBC_USAGE_GET_DATA.Response": {
            "IT_AREA_RANGE": "",
            "ET_USAGE": {
                "item": [...]
            }
        }
    }
}

}

In my JS I try to access to the items

reports.data = data.SOAP:Envelope.SOAP:Body.ns0:Z_ZBC_USAGE_GET_DATA.Response.ET_USAGE.item;

This didn't worked because : signs are not allowed. What should be the correct expression to get the items?

hsz
  • 148,279
  • 62
  • 259
  • 315
Christian
  • 209
  • 1
  • 4
  • 11

1 Answers1

0

Just access properties like array keys:

reports.data = data['SOAP:Envelope']['SOAP:Body']['ns0:Z_ZBC_USAGE_GET_DATA.Response'].ET_USAGE.item;
hsz
  • 148,279
  • 62
  • 259
  • 315