Hi,
I got following documents:
> [
{ "docId":1, "variants":[ { "price":10, "identifiers":[ { "id":1, "value":"1" }, { "id":2, "value":"2" } ] }, { "price":15, "identifiers":[ { "id":3, "value":"3" }, { "id":4, "value":"4" } ] } ] }, { "docId":2, "variants":[ { "price":10, "identifiers":[ { "id":5, "value":"5" }, { "id":6, "value":"6" } ] }, { "price":15, "identifiers":[ { "id":7, "value":"7" }, { "id":8, "value":"8" } ] } ] } ]
My question how for example query document which has identifier with value equal 7? I’d like to use ArrayExpression interface.
I already know how to write query which give me result for documents with price greater than 5, but I need to go even one nesting level further:
doc => variants (arr) => identifiers (arr) => value (property).
Is that possible at all?
Earlier I was doing such kind of queries (with only one level of nesting::
ArrayExpression.Any(ArrayExpression.Variable(“VARIANTS”)).In(Expression.Property(“variants”)).Satisfies(ArrayExpression.Variable(“VARIANTS.price”).GreaterThan(Expression.Int(15)))
Thanks in advance!
Kind Regards,
Piotr