1.4.0 • Published 1 year ago

@tliu.apps/merge-and-accumulate-json v1.4.0

Weekly downloads
-
License
ISC
Repository
-
Last release
1 year ago

Merge and Accumlate json

When I worked on project, I need to merge 2 jsons and need to add the value which attribute existed in these 2 jsons.

npm Package NPM Downloads NPM License


💾 Installation

npm install @tliu.apps/merge-and-accumulate-json

🪧 Usage

const majson = require('@tliu.apps/merge-and-accumulate-json')

💡Sample

const majson = require('@tliu.apps/merge-and-accumulate-json');

var json1 = {
  "at": 3,
  "on": 5,
  "home": 1
};

var json2 = {
  "at": 1,
  "the": 7,
  "in": 4
};

console.log(majson.merge(json1, json2));

// { at: 4, on: 5, home: 1, the: 7, in: 4}

✍️ Authors

LinkedIn

1.4.0

1 year ago

1.3.0

1 year ago

1.2.0

1 year ago

1.1.1

1 year ago

1.1.0

1 year ago

1.0.0

1 year ago