I would like to run the following query in golang using mgo in a pipeline.
{"key1" : 1,
"$or" : [{"key2" : 2}, {"key3" : 2}]}
I have looked everywhere, but I cannot find an example like this. I have tried many different combinations, for example:
...
pipeline := []bson.M{
bson.M{ "$match" : bson.M{ "key1" : 1,
"$or" : bson.M{ "key2" : 2, "key3" : 2},
}
...
}
which compiles correctly, does not find anything. Any ideas?
Thank you in advance