@sunkiranforu when using the Http-connector set your output variable with a inline JS where you have S(response)
. This uses Camunda’s “spin framework” which will parse the JSON string into a JSON object.
If you just want to keep the userID as your output variable do something like
S(response).prop("userid");
If you are accessing the response in other locations (based on your code sample), it would look something like this:
var response = execution.getVariable("WsResponse");
var approverId = response.prop("userid");
Or just
var approverId = execution.getVariable("WsResponse").prop("userid");