2

I have a bsoncxx::document::view bsonObj that is a nested BSON document, it contains sub-documents and sub-arrays (an object that contains an array that then again contains a document, etc). When I access a document the returned object is of type bsoncxx::document::element and when I access an array the returned object is of type bsoncxx::array::element.

The problem is that I need this access to always return the same type. Is there some way to convert one type into the other?

enter image description here

PlsWork
  • 1,958
  • 1
  • 19
  • 31

0 Answers0