skip to Main Content

Can JSON Files be merged with Bash or JQ?

I've got two files containing compressed JSONs. All JSONs having the same root fragments "id" and "test": file1.json: {"test":{"a":2},"id":"850303847"} {"test":{"a":3},"id":"2742540872"} {"test":{"a":4},"id":"1358887220"} file2.json: {"test":{"b":3},"id":"850303847"} {"test":{"b":3},"id":"2742540872"} {"test":{"b":4},"id":"1358887220"} file3.json {"test":{"c":8},"id":"850303847"} {"test":{"c":4},"id":"2742540872"} {"test":{"c":5},"id":"1358887220"} I would like to merge these Files based on it's IDs…

VIEW QUESTION

Does jq return an array of empty values from json?

I have an huge json file (around 7GB) with multiple elements, let's call it data.json. Each element looks like this: {'aggregation_bits': '0xf7fffffffffffdfffffffffffffdfffffffffffffffffffffff7fffffffffffffff7ff', 'data': {'slot': '6436981', 'index': '8', 'beacon_block_root': '0xf8afce2fc26df10061d641633a7256cf47ffa8793771ae83e190e72bf2c5886e', 'source': {'epoch': '201154', 'root': '0x694231a8135b3f546a6fe483ba6b467c686592f6d627aaf06b56ffbd78d75f63'}, 'target': {'epoch': '201155', 'root': '0x2fc0d9f58cda026678d98f010fec13d202eec4ec9ae4dbd57878413a75fe22d7'}}, 'signature':…

VIEW QUESTION

Can jq loop through json & retrieve sets when key exists?

I have the following data : { "storageSummary": "testvalue", "audit1": { "auditScore": 1, "suspensionScore": 1, "password" : "value1", "onlineScore": 0.99743587, "satelliteName": "us2.storj.io:7777" }, "audit2": { "auditScore": 1, "suspensionScore": 1, "password" : "valueX", "onlineScore": 0.9992917, "satelliteName": "saltlake.tardigrade.io:7777" }, "audit3": { "auditScore":…

VIEW QUESTION
Back To Top
Search