JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 479
  • Score
    100M100P100Q86636F
  • License MIT

My tremendous module

Package Exports

  • picker

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (picker) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

picker Build Status

Pick property in json data by string path key

Install

$ npm install --save picker

Usage

var picker = require('picker');

picker(json, 'json.properties.object.name');
//=> unicorns

picker(json, 'json.properties.array.[0].name');
//=> unicorns

API

picker(jsonData, path)

input

Required
Type: json

Target json data contains name and value to pick

path

Required
Type: string

Path to get to target property. Using string index to get a path to Array type property. You can find more information in the test.js

License

MIT © ragingwind