How to retrieve data from odata response?

Thanks, everyone.

My odata response is in the form of (XML) below structure

image

I am able to fetch the data till content (jsonObject.feed.entry[1].content) , but I am not able to retrieve values specific to field1 in this case, could someone help here?

Hi @Venkat.batchu81!

Have you considered using xml2js to access the properties?

// import xml2js
let xml2js = require('xml2js');
// get xml
let xml = pm.response.text();
// prep json variable
let json;

// parse xml and store in json variable
xml2js.parseString(xml, function (err, result) {
    json = result;
});

// do whatever you need with the json
console.log(json);