select-object-path

1.0.1 • Public • Published

npm package version npm package count download travis status coveralls status

select-object-path select-object-path v1.0.1

Introduction

select and extract path from json object

Installation

This package is available on npm as: select-object-path

$ npm install select-object-path

Usage

Param to function sop.select must repect json-schema select.in.schema.json.

var sop = require('select-object-path');
var result = sop.select({
    "select" : "-*,ccc", // exclude all except ccc
    "object": {
        "aaa": {
            "bbb" : {
                "ccc" : null
            }
        },
        "ccc": 10
    }
});

sop.select return result which respect json-schema select.out.schema.json.

{
    "path": [
        "/aaa/bbb/ccc",
        "/ccc"
    ],
    "licence": "GPL-3.0",
    "donate": [
        "https://pledgie.com/campaigns/28037",
        "https://gratipay.com/aminassian"
    ]
}

Test

To run the test suite, download the source code, install the dependencies and run npm test.

$ git clone https://github.com/aminassian/select-object-path.git
$ cd select-object-path
$ npm install
$ npm test

Coverage : http://aminassian.github.io/select-object-path/coverage/index.html

Made by

The original author of select-object-path is Alban Minassian.

If you like select-object-path and would like to support it, you are welcome to make a donation. It will surely be appreciated! Thanks!

donate with your pledgie accountdonate with your gratipay account

License

GPL-3.0

Logo : fa-tree from Font-Awesome (licence SIL OFL 1.1)

External libraries :

Links

Release Notes

  • 1.0.1 (2015/01/24):
    • init init

Copyright © 2015 - Proudly Made In Nantes [![nantestech][nantestech-image]][nantestech-url] [nantestech-image]: https://raw.githubusercontent.com/aminassian/select-object-path/master/img/NANTES-TECH-LOGO-NOIR-HOR.png [nantestech-url]: http://www.nantestech.com

Readme

Keywords

Package Sidebar

Install

npm i select-object-path

Weekly Downloads

0

Version

1.0.1

License

GPL-3.0

Last publish

Collaborators

  • aminassian