Following are snippets of my code in C, redacted for ease of reading:
bCursor = mongoc_collection_find_with_opts(...);
mongoc_cursor_next(bCursor, &bDoc);
where I get the document in bDoc as json:
{
"_id" : { "$numberInt" : "4184300" },
"msgTime" : { "$numberInt" : "969481160" },
"msgLTm" : { "$numberInt" : "969484760" }
}
How do I the fields _id, or msgTime or msgLTm?
I have tried
if (bson_iter_init(&bIter, (bson_t *)&cDoc) && bson_iter_find_descendant(&bIter, "_id", &bVal))
....
but to no avail.. as there are no descendants perhaps.
Any feedback will most appreciated. Cheers