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);
我想更改doc time字段值,以便将收集返回给客户端。但我发现没有接口可以从mongocxx调用。
谁能告诉我该怎么办?谢谢!