Fetch filter syntax

#1

how to reference a field in a fetch filter expression? ex:
var flights = Flight.fetch({ filter: “departureHub == flight.route.departureHub”});

0 Likes

#2

Your filter expression must start with the field path, then check for the value expected. You can also use ExpressionEngineFunction Type to find more functions/Operations.
ex:
var flights = Flight.fetch({ filter: “route.departureHub== '” + departureHubId + “’” });

0 Likes