Using MongoDb c driver to extract array from bson
问题 I have documents in a mongo collection which look like: { "f" : [ 283, 180, 284 ], "l":["1","29"] } I am using the mongoDB c driver to fetch these documents and perform some operations on these> I would like to restore element "f" back as an array of integers and the element "l" back as an two multidimensional char array. while (mongoc_cursor_next (cursor, &doc)) { bson_iter_t it; bson_iter_init(&it, doc); while (bson_iter_next(&it)) { const char * key=bson_iter_key(&it); bson_type_t type