Returns all parent child relations from a json file
JavaScript
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
test
.gitignore
.travis.yml
LICENSE
README.md
index.js
package.json

README.md

build status deps status

parentchild

Returns all parent child relations from a json file

console.log(
  parentchild({
    a: {
      b: 'foo'
    },
    c: ['a', 'b']
  }));

Returns

  [['child', undefined, 'a'],
   ['child', 'a', 'b'],
   ['value', 'b', 'foo'],
   ['child', undefined, 'c'],
   ['inarray', 'c', 'a'],
   ['inarray', 'c', 'b']]