Example of what I'd love to be able to do:
query.filter(function (person) {
return person[this.field] == this.value;
}, {
field: 'FirstName',
value: 'Lea'
});
This throws an exception as of JayData 1.3.2.
Note that hard-coding the property name with []
syntax works as expected (although not useful):
query.filter(function (person) {
return person['FirstName'] == this.value;
}, {
value: 'Lea'
});
- Is this possible without eval() trickery?
- If not, is there any kind of alternative?
Note: Using the OData provider, if that matters.