Reputation: 3078
I have a collection of objects which have a sub dictionary which contains data for a given institution, identified by the provider_id
.
How can I query a collection, products
and return only produce which contain a given provider id?
"natl_total_cost": 1.27478784E9,
"natl_average": 8338.487,
"natl_report_count": 152880,
"name": "Wax",
"provider_cost_dict": {
"340008": {
"report_count": 181,
"total_cost": 1335465,
"average_cost": 7378.26
},
"340001": {
"report_count": 643,
"total_cost": 5026724,
"average_cost": 7817.6113
},
...
How could I query all of the products so that it only returns products which contain a given provider id in their provider_cost_dict
?
Upvotes: 3
Views: 489