I'm using mongokit and I have a structure similar to this in my document.
class MyDoc(Document):
structure = {
'sections': [{
'title': unicode,
'description': unicode
}]
}
required_fields = []
I want to make description a required field in this document. I know nested keys can be accessed via the dot notation, but sections.description does not work. How do I achieve what I want?
You may want to try
sections.$.descriptionhttp://docs.mongodb.org/manual/reference/operator/update/positional/