created=$(curl -i -X POST -H 'Content-Type:application/json' --data "$(payload)" https://myurl/resource)
The above return a json object
{
"revision": {
"clientId": "",
"version": 1,
"lastModifier": "admin"
},
"id": "idvalue",
"uri": "https://myurl/idvalue",
"position": {
"x": 100,
"y": 200
}
}
I am using the below code to get id from above object
idvar=$(echo $created | jq ' .id' )
but the above gives me the below error
parse error: Invalid numeric literal at line 1, column 9