Skip to main content
100%

Append some new json to some existing json

✓ Published0🌍 Public
GGeoWill
Last edited Nov 21, 2018
Created on Nov 21, 2018

This example shows how to merge two JSON files into a single, updated JSON object. The command-line tool `jq` uses its `-s` flag to read both input files into a single array, then applies the `.[0] + .[1]` filter to concatenate the two objects, writing the result to `updated.json`. The process relies entirely on `jq`’s stream editor and its built-in addition operator for objects. The source data originates from the two input files, and the output is a new file.

AI-generated description

Similar vizzes