It's not possible to select ... where foo = true or select ... where foo = false.
That is,
data = [
{ "id": 1, "foo": true },
{ "id": 2, "foo": false }
];
return select * from data where foo = true;
does not return any results.
Replacing the expression with id = 1 returns a single result, as expected.