I have a collection named example_Collection with data of format:
{
{
"_id": ObjectId("100"),
"source_timestamp":{
"sec" : 90000
}
}
{
"_id": ObjectId("200"),
"source_timestamp":{
"sec" : 95000
}
{
"_id": ObjectId("300"),
"source_timestamp":{
"sec" : 100000
}
}
}
}
I need to find the documents which has sec from greater then 9000 and small than 10000.
For this mongoquery is working: db.example_Collection.find({"source.timestamp.sec":{$gte:9000,$lt:10000}})
but how to write the same query in mongo C driver?