My mongodb database looks like this.
[{
"_id": ObjectId("5e049ebc8e935c407f78c190"),
"2020-04-25": [
{
"browser": "Chrome",
"ts": "2020-04-25 21:05"
},
{
"browser": "Firefox",
"ts": "2020-04-25 21:05"
}
]
},
{
"_id": ObjectId("5e049ebc8e935c407f68c190"),
"2020-04-26": [
{
"browser": "Chrome",
"ts": "2020-04-26 10:45"
},
{
"browser": "Edge",
"ts": "2020-04-26 10:45"
},
{
"browser": "Firefox",
"ts": "2020-04-26 10:46"
}
]
}]
I want to find all distinct values of key browser.
I tried using distinct but i'm stuck on how to use it for all dates in the db.
I tried $all operator but found out it can be only used for values not the key.