jsonism
v1.0.0
Published
**parse** -> Retrieves all of the key-value pairs of the JSON object along with key-value pairs of sub JSON objects.
Downloads
2
Maintainers
Readme
Jsonism
An NPM package which helps you retrieve meta-data of any JSON object in an easy manner.
This package has 1 function as of now. Future functions/modules will be added based on usage and necessity.
parse -> Retrieves all of the key-value pairs of the JSON object along with key-value pairs of sub JSON objects.
Installation instructions
npm i jsonism
How to use
var jsonism = require('jsonism')
var jsObject = { a: "1", b: 2, c: { d: "3", e: "4" } };
jsonism.parse(jsObject)
returns
{ keys: [ 'a', 'b', 'c', 'd', 'e' ],
values: [ '1', 2, { d: '3', e: '4' }, '3', '4' ],
keyValuePairs: [ a: '1', b: 2, c: { d: '3', e: '4' }, d: '3', e: '4' ] }