auto cur = collection.find(make_document(kvp("userId", uid)), findOptions);
auto collects = bsoncxx::builder::basic::array{};
for (auto &&doc : cur) {
doc["time"] = "some new value"; // this line can't execute
collects.append(doc);
}
response_success(req, collects);
I want to change the doc time field value, so that return the collects to client. but I found that no interface can call from mongocxx.
who can tell me how to do? Thank you!