node package manager
Painless code sharing. npm Orgs help your team discover, share, and reuse code. Create a free org »

json-combinator

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
}