Hi,
I have this kind of response in xml:
<soapenv:Envelope xmlns">
soapenv:Header
<work:WorkContext </work:WorkContext>
</soapenv:Header>
soapenv:Body
<InvokeSBSEventRs xmlns=">
GET_OPEN_DATE
06-02-2020 00:00:00
</soapenv:Body>
</soapenv:Envelope>
I would like to get only date - 06-02-2020 from this response
- If iām using this kind of script:
var jsonData = xml2Json(responseBody);
console.log(jsonData);
var date = jsonData[āsoapenv:Envelopeā][āsoapenv:Bodyā].InvokeSBSEventRs.Parameters.Parameter;
console.log(date);
pm.globals.set(ādateOfEnvā,JSON.stringify(date)) ;
as a variable i have whole text
{ā_ā:ā06-02-2020 00:00:00ā,ā$ā:{ānameā:āOPEN_DATEā,ātypeā:āoracle.jbo.domain.Dateā,āformatā:ādd-MM-yyyy HH:mm:ssā}}
- If iām using:
let res = xml2Json(pm.response.text());
pm.globals.set(ādateOfEnvā,_.get(res,āInvokeSBSEventRs.Parameters.Parameterā));
then as a result - null
Will be thankful for help