convert from a bson to the v8 object