If we have the following JavaScript object:
var obj = {
field: {
field: {
field: {
field: {...}
}
}
}
}
how deep can MongoDB go?
In accordance with the official documentation MongoDB supports 100 levels of nesting for BSON documents. Beside this there's a size limitation for a single document which is 16 megabytes.
If you are interested in storing larger documents you should read about GridFS.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With