-
Notifications
You must be signed in to change notification settings - Fork 74
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
String expressions fail when properties are in an object #12
Comments
So Filtrex fails to match strings when they are nested inside an object. Do you think this is a problem with Filtrex or with the underlying jison engine? |
Filtrex does not support nested expressions. I haven't added it because there's a lot of edge cases I'd like to think through first. To handle this, you'll have to write code that flattens your structure into a single nested object. For example, convert this: {
obj: {
foo:'a',
bar:'b'
}
} into this: {
'obj.foo': 'a',
'obj.bar': 'b'
} |
Related to issue joewalnes/filtrex#12, filtrex does not support nested properties.
For a temp solution you can use https://www.npmjs.com/package/flat package :) |
Also, the new filtrex supports the let f = compileExpression('version of software >= 1.4')
f({ software: {name: 'Foo', version: 2} }) // true
f({ software: {name: 'bar', version: 1} }) // false Using |
Joe I like this tool!
I ran this unit test, which is similar to your existing unit test. It always returns false/0
The text was updated successfully, but these errors were encountered: