# arrays will be converted into unnamed lists without any symplifying:
l <- list(storageArray = list('value_1', 'value_2'))
# Here we construct bson of form {'storageArray':['value_1''value_2']}
b <- mongo.bson.from.list(l)
# simplify
print(mongo.bson.to.list(b, simplify = TRUE))
# not simplify
print(mongo.bson.to.list(b, simplify = FALSE))
# heterogeneous types of array values
print(mongo.bson.to.list(mongo.bson.from.list(list(x = list('a', 1))), simplify = TRUE))
# identical to call with simplify = F
print(mongo.bson.to.list(mongo.bson.from.list(list(x = list('a', 1))), simplify = FALSE))
Run the code above in your browser using DataLab