I have a .json file that I need to extract the SliceTiming field from into a separate txt file. I cannot use jq. If I could, my command would be
jq .SliceTiming[] *.json
Here is the .json file
{
"EchoTime": 0.033,
"RepetitionTime": 0.75,
"EffectiveEchoSpacing": 0.0005,
"SliceTiming": [
0.51,
0,
0.365,
0.0725,
0.4375,
0.2175,
0.5825,
0.2925,
0.6575,
0.145,
0.51,
0,
0.365,
0.0725,
0.4375,
0.2175,
0.5825,
0.2925,
0.6575,
0.145,
0.51,
0,
0.365,
0.0725,
0.4375,
0.2175,
0.5825,
0.2925,
0.6575,
0.145,
0.51,
0,
0.365,
0.0725,
0.4375,
0.2175,
0.5825,
0.2925,
0.6575,
0.145,
0.51,
0,
0.365,
0.0725,
0.4375,
0.2175,
0.5825,
0.2925,
0.6575,
0.145,
0.51,
0,
0.365,
0.0725,
0.4375,
0.2175,
0.5825,
0.2925,
0.6575,
0.145 ],
"PhaseEncodingDirection": "j-"}
jq, any guarantees how the json file is formatted wrt. white space, line endings etc.?jq?