I am parsing an API which sends me a JSON response like this:
{
"newList": {
"243": {
"id": "243",
"name": "test",
"create": {
"date": "2017-08-31 13:57:29"
}
},
"244": {
"id": "244",
"name": "test",
"create": {
"date": "2017-08-31 13:57:29"
}
}
}
}
I am trying to get the name and the create date out of this using bash with jq, so for with little to no success.
jq '.newList' does work and brings me down one level, but that's not sufficient.
jq '.newList .243' gives me a compile error. Furthermore, the 243 is dynamic and can change at any time. What am I doing wrong here?