I'm using Bash to extract json keys by 'jsawk'. I converted a some.xlsx to some.json by node xlsx . I have some keys like this:
"Scheduled Release"
"Standard Input Parameters\n(Dev)"
The second one contains '\n' because the cell in the .xlsx has 2 lines.
The problem is that I cannot extract the value, using this:
$ cat some.json | jsawk -n 'out(this.["Scheduled Release"])'
or
$ cat some.json | jsawk -n 'out(this.["Standard Input Parameters\n(Dev)"])'
No problem for the keys without white spaces. My some.json contains an array of objects like this:
{
"Service": "A service",
"Resource": "Some Users",
"Engineer": "A name",
"Description": "A description",
"Scheduled Release" : "1.0",
"Method": "A method",
"Endpoint": "An enpoint",
"Standard Input Parameters\n(Dev)": "Some inputs"
}
How can I do this with Bash?