when I’m doing let jsonObject = xml2Json(pm.response.text()); its only returning me first data object. How I can get all the data objects and parse them to JSON as array?
Is this the entire response of your API call? If so, I can replicate the problem, and I understand why it is happening; XML documents are supposed to only have a single root node, and this is why xml2json only parses the first object that it encounters. (I see the same problem when I try to use xml2js as well.)
I think the best way to resolve would be to pad your response to include a parent tag, for instance: