Hi,
I cannot seem to attach an image to this topic, so I’ll paste in the code. I have the following test script inserted into the TESTS box:
const xml2js = require(‘xml2js’);
xml2js.parseString(pm.response.text(), function (err, result) {
console.log(result);
});
The endeavor is to convert the xml payload to json. I’m using a URL with query string and API_DoQuery with parameters to pull limited data from a Quick Base app. I get the following xml:
<?xml version="1.0" ?> API_DoQuery 0 No error Tickets Main work area 280097 [email protected] Sales Reporting ResolvedThe objective is to use the test script to produce JSON notation. Can someone tell me what I’m doing wrong, or what additional things I should do to produce JSON?
thanks,
cgreene