Hello, I have the following code :
while (bson_iter_next(&iter)) { const char* key = bson_iter_key(&iter); if (!_paths.count(key)) { _template->SetAccessor( String::NewFromUtf8(isolate, key), &BSONObject::getter, &BSONObject::setter ); } } Local<Object> obj = _template->NewInstance(); I build a object with all fields in a document BSON. I have a list of documents and they all go through this code. I realized that if the first have not fields which others have they won't be define. I explain : BSON 1 : {foo: 3} BSON 2 : {foo: 2, boo: 4} When I will use my getter in JS he will show me : BSON 1 : {foo: 3} BSON 2 : {foo: 2} How I can add this field's accessor ? Thanks for your help -- -- v8-users mailing list v8-users@googlegroups.com http://groups.google.com/group/v8-users --- You received this message because you are subscribed to the Google Groups "v8-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to v8-users+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.