Skip to content
New issue

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

Find entries that contain a certain string #23

Open
stefaneichert opened this issue Mar 16, 2019 · 0 comments
Open

Find entries that contain a certain string #23

stefaneichert opened this issue Mar 16, 2019 · 0 comments

Comments

@stefaneichert
Copy link

Hi and first of all thanks for the great work on this library!
I could not figure out yet if there is a way to find entries that contain a certain string.
With the starting letter it works well:
var family = jsonQ(myjson);
var result = family.find('name', function () {
return this[0] == 'f'
});
This will of course return all entries that start with an f. Is there a way to use wildcards or such to query entries that contain a certain string e.g. return this == '%xyz%''
and return for example all entries that are like "foo xyz bar", "barfoo xyz" etc...

Thank you very much in advance!
Stefan

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant