Learn about our RFC process, Open RFC meetings & more.Join in the discussion! »

get-object-value

0.1.8 • Public • Published

Get object value with paht

Spec


import get from 'get-object-value';

get(object, path, defaultValue)

Example Usage


import get from 'get-object-value';

let demoObject = {
  a: {
    b: c1
  }
};

let v1 = get(demoObject, ['a','b']); // return c1

let v1 = get(demoObject, ['a','b','d'], 'c2'); // return c2

Set Object Value

Loadash

Keywords

none

Install

npm i get-object-value

DownloadsWeekly Downloads

185

Version

0.1.8

License

MIT

Unpacked Size

6.55 kB

Total Files

6

Last publish

Collaborators

  • avatar