KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
Say I have a data structure something like this: { 'name': 'test', 'anotherdoc': { 'something': 'someval', 'somenum': 1 } } Now, say I wanted to set something. Initially, I though it would be done like so: collection.update({'_id': myid}, {$set: {'anotherdoc.something': 'somenewval'}); This, however, seems to be incorrect. It does put some data in there, but it does so in an odd manner. It would, in this case, end up like so: [ { 'name': 'test', 'anotherdoc': { 'something': 'someval', 'somenum': 1 } }, ['anotherdoc.something', 'someval'] ] Of course, not what I was looking for.
Tags (comma-separated)
Save Edits
Cancel