Get data from soap response into a variable

Hi all,I am new to post man and i want to get value from soap response body and put it inside a variable ,my test script is : var jsonObject=xml2Json(responseBody);
var first_name=jsonObject[‘SOAP-ENV:Envelope’][‘SOAP-ENV:Body’].serviceInquiryResponse.FIRST_NAME;
console.log(first_name)

–I am getting the below error—
TypeError| cannot read property ‘FIRST_NAME’ of undefined

the soap response appear as below (I want to get the value inside the first_name tag and print it )

ns2:serviceInquiryResponse:{ }
$:{ }
ns2:rows: { }
ns2:row: { }
ns2:parameters: { }
ns2:parameter:
0 :{}
1 :{}
2 :{}
3 :{}
ns2:Key: “FIRST_NAME”
ns2:value: “test”

@koky I have not done a ton of work with SOAP calls/responses in Postman but I did have to extract a value from a response once, this is an example of what I did if its any help.

var xml = cheerio.load(responseBody, {
  ignoreWhitespace: true,
  xmlMode: true
});

var elementContent = xml("LoginResult").attr("SessionHeader");
pm.environment.set("SessionHeader", elementContent);```

I think you are on the right track with xml2Json, you just need to find the right path to what you are looking more. Make sure you understand how arrays and objects work in JavaScript.