LD-47 Sample bson to object function