Hi,
Getting the below error, for checking and fetching specific field from matched json entity.
jsonPath($.jobs.[?(@.job==‘FXBATCH’)].jobStatusID).find.exists extraction crashed: end of input expected
Galting code to used for fetching jobStatusId from the matched entity.
http(httpScenario).get(appUrl + BaseConstants.EODBatch.EOD_All_URI)
.headers(
Map(
BaseConstants.GeneralProps.TRADE_ACCESS_TOKEN->BaseConstants.GeneralProps.TOKEN_VAR_KEY
)
)
.asJson.check(status.is(200))
.check(jsonPath("$.jobs.[?(@.job==’${batchName}’)].jobStatusID").saveAs(BaseConstants.EODBatch.JOB_STATUS_ID))
The json response for the above call.
{
“jobs”:[
{
“branch”:“01”,
“job”:“FXBATCH”,
“jobStatusID”:“E9F6B0AB-89C1-4144-A89B-47A841FB1CB0”,
},
{
“branch”:“01”,
“job”:“FXDREL6”,
“jobStatusID”:“6FB79FF4-3424-4B72-BAC8-0D55B28E9E6E”,
}
],
“error”:null,
“interrupts”:null,
“sessionID”:null
}
Could you please provide the proper fix for this issue.
Regards,
Umeshwaran.V