{
"_id" : ObjectId("57ab14508b16c9557dcfa316"),
"dpid" : "202481588545212",
"mac" : "b8:27:eb:28:a6:bc",
"extranet_gateway_mac" : "f0:b4:29:52:8f:b6",
"extranet_gateway_ip" : "192.168.31.1",
"extranet_public_ip" : "59.66.214.24",
"extranet_private_ip" : "192.168.31.118",
"extranet_netmask" : "255.255.255.0",
"intranet_cidr_prefix" : 22020096,
"intranet_cidr_length" : 29,
"persist" : 0,
"timestamp" : 1470187766
}
auto cursor = db["OVS_DETAILS"].find({filter_builder.view});
for (auto&& doc : cursor) {
std::cout << bsoncxx::to_json(doc) << std::endl;
}
--
You received this message because you are subscribed to the Google Groups "mongodb-user"
group.
For other MongoDB technical support options, see: https://docs.mongodb.com/manual/support/
---
You received this message because you are subscribed to the Google Groups "mongodb-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mongodb-user...@googlegroups.com.
To post to this group, send email to mongod...@googlegroups.com.
Visit this group at https://groups.google.com/group/mongodb-user.
To view this discussion on the web visit https://groups.google.com/d/msgid/mongodb-user/9e5c592a-d1cb-452f-9606-3d870ef1ad6a%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
bsoncxx::to_json(doc["timestamp"].get_value())
bsoncxx::document::element e = doc["timestamp"]; // element is a non-owning view of a single key/value pair
// Check that the element exists and is of the right type
if ( e && e.type() = bsoncxx::type::k_int64 ) {
// extract value as bsoncxx::types::b_int64, which converts to int64_t
int64_t timestamp = e.get_int64();
}