json-keys-compare
Trivial nodejs utility for comparing key sets of two objects that can be passed as JSON files. Used in custom project for tracking consistency of language files.
Installation
$ npm install git+https://github.com/pmstss/json-keys-compare.git
Usage
Command line
$ git clone https://github.com/pmstss/json-keys-compare$ cd json-keys-compare$ npm install$ node usage.js file1.json file2.json
Sample output:
file: file1.json, keys found: 284file: file2.json, keys found: 285unique keys in file file1.json: label.library.categories.more
API
var jsonKeysCompare = ;jsonKeysCompare;// orjsonKeysCompare;// return value: // {// unique1: [array of unique keys for the first file/object],// unique2: [array of unique keys for the second file/object]// }
See usage.js
Version
0.1.0
License
MIT