Using Mongo DB (Azure cosmos DB) and i need to filter out objects based on 2 fields inside the documents
Here is an example class:
class Event{
public long startTime;
public long endTime;
}
I need to find all events that their startTime==endTime
In sql i would do
Select * from Events where startTime=endTime
or
Select * from Events where startTime!=endTime
How do i do it in mongo?
collection.find(???).first();