MongoDB I have one document, I need to get one object,
if locale.en then it will return that info
if locale.fr' then it will return that info
{
"locale": {
"en": {
"dashboard": {
"DASHBOARD_TITLE": "Some title"
}
},
"fr": {
"dashboard": {
"DASHBOARD_TITLE": "Some title french"
}
},
"pr": {
"dashboard": {
"DASHBOARD_TITLE": "Some title portugues"
}
}
}
}
How to query this specific object?
db.collectionName.find({locale.en})

localewith a property calleden- oh, wait, that's not valid syntax at all anyway - that's not how you pass anything in javascript