json-combinator

Combine JSON files (or simple) JavaScript Objects.

npm install json-combinator
1 downloads in the last week
5 downloads in the last month

JSON Combinator

Combine JSON files (or simple) JavaScript Objects.

Example:

var JSONCombinator = require('./..');

var obj = new JSONCombinator({
  "test": {
    "hey": "ho",
    "santa": "claus"
  },
  "foo": "bar",
  "beebob": 123
});
obj.add({"test": {"blupp": 2}});

obj.toJSON() returns:

{
  "test": {
    "hey": "ho",
    "santa": "claus",
    "blupp": 2
  },
  "foo": "bar",
  "beebob": 123
}
npm loves you