1

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'
});
  1. Is this possible without eval() trickery?
  2. If not, is there any kind of alternative?

Note: Using the OData provider, if that matters.

4

1 に答える 1