I have a specific kind of JSON which I need to code into a model for my Django problem. Problem is I have nested document in it or should I say object of objects and I don't know how to design the model in Pymodm or Mongoengine.
Here is the JSON schema on which I am working.
{
"something": "something",
"safasf": 5,
"key": {
"value1": ["dsd", "dd"],
"value2": {
"blah1": "blahvalue1",
"blah2": "blahvalue2"
}
}
}
I have already looked into the documentation and API References of both these ODMs. I could not find anything useful. At best they have fields.EmbeddedDocumentListField which stores list of documents/objects.