I want to use jq to help me make a file for every key, with the 3 specific values pertaining to that key, formatted in json.
I know how to get my keys, and I know how to get my values. But how can I do all this in one command so that I have the info I want, in different files, per key with the keys respective values?
Here is how I get keys:
cat $DCAR_API | jq .vendors[].products[].images | jq -r 'keys[]'
Here is the info I want to be in every json file:
cat "$DCAR_API" \
| jq -r '.vendors[]|.products[]|.images[].tags[].pgpSignature'
cat "$DCAR_API" \
| jq -r '.vendors[]|.products[]|.images[].tags[].imageManifest'
cat "$DCAR_API" \
| jq -r '.vendors[]|.products[]|.images[].tags[].image'