Add two or more JSON objects/files, through command-line or programmatically.
There are two ways to install json-addition: globally and locally.
$ npm install -g json-addition
$ json-addition --help
$ json-addition --inputFiles="*.json" --outputFile="output.json"
$ npm install --save json-addition
var jsonAddition = require('json-addition');
var output = jsonAddition.addJSONs(
{ time: '11 minutes', count: { shops: 1, customers: ['a1'] } },
{ time: '22 minutes', count: { shops: 2, customers: ['b1', 'b2'] } }
);
Output:
{ time: '33 minutes', count: { shops: 3, customers: ['a1', 'b1', 'b2'] } }
See also the list of contributors who participated in this project.