I'm developing a webapp which has a portal-ish component to it (think like multiple panels that can be drug around from column to column and added or removed). I'm using MongoDB to store this info with a format like so...
{
_id: ObjectId(...),
title: 'My Layout',
columns: [
{
order: 1,
width: 30,
panels: [
{ title: 'Panel Title', top: 100, content: '...' },
{ title: 'Panel Title', top: 250, content: '...' },
]
},
{
... multiple columns ...
}
]
}
I'm attempting to use atomic/modifier operations with update() and this is getting confusing. If I wanted to just update one property of a specific panel, how do I reference that?
update(
{ _id: ObjectId(...) },
{ $set: { columns.[???].panels.[???].top: 500 }
)