I have a Firebase collection that I want to query by a value inside an array of Maps.
So I want to query the documents inside the "products" collection by the value of "id" inside the "shops" array. I have used the following code in Flutter but it returns an empty list.
var snap = await _productsCollection
.where('shops', arrayContains: {'id': mid})
.where('isActive', isEqualTo: true)
.get();
How can I get the result I want correctly?