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
Ok so the get function is there, but it gets the end obj/arr. A filter function will be great that does this:
const members = [ { username: 'gumbouser', profile: { age: 33 } }, { username: 'tsuyoshiwada', profile: { age: 24 } }, { username: 'sampleuser', profile: { age: 30 } }, { username: 'foobarbaz', profile: { age: 33 } } ]; dot.filter(members, '*.age', 33); // => [ { username: 'gumbouser', profile: { age: 33 } }, // { username: 'foobarbaz', profile: { age: 33 } } ]
returns the objects that have hits from the root.
Implementation is simple here (sketch):
Filter function. takes in obj (object to filter) and path (the dot-wild path to use)
// filter function return obj.filter(o => dot.has(o, path));
the path given can/should take into account that this is an inner part of the obj
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Ok so the get function is there, but it gets the end obj/arr. A filter function will be great that does this:
returns the objects that have hits from the root.
Implementation is simple here (sketch):
Filter function. takes in obj (object to filter) and path (the dot-wild path to use)
the path given can/should take into account that this is an inner part of the obj
The text was updated successfully, but these errors were encountered: