I have a json file with the following contents
{"STATUS":"PASS","PASSRATE":96.95238}
I want to store the passrate so that I can use it to append to a filename.
I have a json file with the following contents
{"STATUS":"PASS","PASSRATE":96.95238}
I want to store the passrate so that I can use it to append to a filename.
Check jsonextractor.bat with which you can extract information from json file by given dot notated path to object:
jsonextractor.bat data.json PASSRATE
You could use Xidel for that:
xidel -s data.json -e "$json/PASSRATE"