To transform the given JSON into the desired format using jq, you can use the following command:
jq
jq -r 'to_entries[] | "\(.key)@\(.value.field_0)"' input.json
to_entries[]
key
value
"\(.key)@\(.value.field_0)"
field_0
-r
If your input is saved in input.json, running the above command will produce:
input.json
key_0@value_0 key_1@value_1
This is a shared conversation and may include unverified content that doesn't reflect Mistral AI's views. Login to resume chatting.
Vibe can make mistakes. Check answers. Learn more