I'd like to know if there is a way to parse a cURL response without using PHP. Every example I've seen seems to explicitly use PHP.
- I'm calling cURL within a bash script.
I cURL a URL and receive this XML response:
{"name":"callINSTANCETESTJob","id":10900,"status":"COMPLETED","message":"The job has finished."}
My goal is to obtain the numeric value following "id"
and setting it to a variable
EDIT:
my curl statement is as follows:
JOB_NAME=$1
request_url="https://127.0.0.1:8443/batch/$JOB_NAME"
curl -k -H "Content-Type: application/xml" $request_url | jq -r 'id.'