Documentation gives example on how to use "where" operator with constants filters (like "1" and "John", in example below)
$.customers.where($.orders.len() >= 1 or name = "John")
In real life applications, users will most likely need to use variables defined from context.
I couldn't find how to do this in the documentation, only by reading the code.
Documentation gives example on how to use "where" operator with constants filters (like "1" and "John", in example below)
$.customers. where($ .orders. len() >= 1 or name = "John")
In real life applications, users will most likely need to use variables defined from context.
I couldn't find how to do this in the documentation, only by reading the code.
I suggest adding the following example in Quickstart (https:/ /opendev. org/openstack/ yaql/src/ branch/ master/ README. rst)
let(target_age => $.target_ age)->$ .users. where($ .age=$target_ age)
And maybe adding a brief description of operation "context pass" (->) which is barely mentioned in the doc and not explained at all.