Parse Json Response

Hello,

I would like to obtain in a response of http-connector, only the “number” element, but I cannot obtain it.
I’m trying to have an inline Javascript with the following statement:
S(response).prop(“status”).prop(“number”).numberValue();
but it shows an error: SPIN/JACKSON-JSON-01004 Unable to find ‘status’

What it’s wrong in the statement?

Rest response to parse:

{
“status”: {
“number”: 200,
“type”: “OK”,
“description”: “Status OK”,
}
}

Regards.

You can try to write the name of the class :
org.camunda.spin.Spin.S(response).prop(“status”).prop(“number”).numberValue();

@1234 I’ve tried but the error stills the same. I’m thinking about the spin I’m trying to do is correct?

Regards.

Hello.
I am also facing below issue , When I am running in main class same Expression [ ${S(response).prop(“data”).prop(“email”) ] working fine as expected getting output , when I am runnning test cases then facing below Issue:-

Exception while closing command context: Error while evaluating expression: ${S(response).prop(“data”).prop(“email”)}. Cause: org.camunda.spin.json.SpinJsonPropertyException: SPIN/JACKSON-JSON-01004 Unable to find ‘data’
org.camunda.bpm.engine.ProcessEngineException: Error while evaluating expression: ${S(response).prop(“data”).prop(“email”)}. Cause: org.camunda.spin.json.SpinJsonPropertyException: SPIN/JACKSON-JSON-01004 Unable to find ‘data’

If anyone gone through this , please let me know , Thanx in advance