We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add support for JavaScript Map
Access to map keys via prop notation and bracket notation
const obj = { nested: { map: new Map() } } const newObj = set(obj, 'nested.map.foo', 'bar') get(newObj, 'nested.map["foo"]') // bar
Iterate over map values
const obj = { nested: { map: new Map([['foo', { val: 'bar' }], ['aze', { val: 'rty' }]]) } } get(obj, 'nested.map[:].val') // ['bar', 'rty']
In addition it would be nice to support more literals in bracket notation, since map keys might be of any type !
The text was updated successfully, but these errors were encountered:
How do you allow the user to put a key that is not a string or number ?
Sorry, something went wrong.
For now I have only these examples in mind:
get(obj, 'nested.map[true].val') // boolean get(obj, 'nested.map[6.66].val') // floating number get(obj, 'nested.map[null].val') // null
but if we allow path to be an array, we might accept any value
path
No branches or pull requests
Description
Add support for JavaScript Map
Access to map keys via prop notation and bracket notation
Iterate over map values
In addition it would be nice to support more literals in bracket notation, since map keys might be of any type !
The text was updated successfully, but these errors were encountered: