in my database, there are two companies with same name.
[
{
"name": "samsung",
"store_code": "34d"
},
{
"name": "lg",
"store_code": "333"
},
{
"name": "lg",
"store_code": "3511"
}
]
like this..
my question is, I juse made my python function to get store information by name.
that looks like this..
async def fetch_store_by_name(store_name):
document = collection.find_one({"name":store_name})
return document
and I can only get the first lg company's information. how can I get both informations of lg company from my mongodb?