Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- {
- "0": {
- "filed1": "xxxx",
- "field": "zzzz"
- },
- "1": {
- "field1": "xxx",
- "filed2": "zzz"
- }
- }
- {
- {
- "id": 0,
- "filed1": "xxxx",
- "field": "zzzz"
- },
- {
- "id": 2,
- "field1": "xxx",
- "filed2": "zzz"
- }
- }
- jq 'to_entries | map({id: .key} * .value)' file.json
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement