I have an array of customers, each customer has a collection of orders.
the query below returns customers and their orders and works as expected:
~Customers?$expand=Orders
Now I want to get the existing customers but filter their orders by Order.Amount > 100 (I'm happy for the customers having no such orders to remain in the list),
When I'm trying the following:
~Customers?$expand=Orders&$filter=Orders/Amount gt 100
I'm getting the following error:
The 'Amount' is not allowed at position ***. Member access or specifying a type identifier on a resource set reference is not allowed.
I can loop through the customers and call
~Customers('Blah')/Orders?$filter=Amount gt 100
which works, but I'd really like to get it done in one go.
Could you advice on how do I accomplish this?