dot-prop-wild

Get value from object or array using dot path and wildcard.

Usage no npm install needed!

<script type="module">
  import dotPropWild from 'https://cdn.skypack.dev/dot-prop-wild';
</script>

README

Dot-prop-wild

Get value from object or array using dot path and wildcard.

Installation

npm install dot-prop-wild
# or
yarn add dot-prop-wild

Usage

This library is written using ES6, in order to use it in your project it is advised to transpile it to your environment. The easiest way to do this is by using Babel with @babel/preset-env.

import get from 'dot-prop-wild'

const data = [null, 1, [{ name: 'Sam' }]]

get(data, '*.*.name')

License

MIT