title: How do I update an array on a nested subdocument in Meteor?
body: <p>I have a collection like this (called <code>project</code>):</p>
  
  <pre><code>{
    "_id" : id,
    name: '',
    title: '',
    "user": [
      {
        "username" : "manager",
        "role" : [
          "manager"
        ],
        "group" : "group",
        "Assign" : [
          "education"
        ]
      },
    ],
    "category" : [
      "education"
    ]
  }
  </code></pre>
  
  <p>I'm trying to update the collection to replace the "Assign" array items:</p>
  
  <pre><code>Project.update({
    _id: id,
    'user.Assign': cat
  }, {
    $set: {
      'user.$.Assign.$': new Cat
    }
  }, {
    multi: true
  })
  </code></pre>
  
  <p>I get the</p>
  
  <blockquote>
    <p>Cannot apply the positional operator without a corresponding query field containing an array</p>
  </blockquote>
  
  <p>error though. What is the proper way to do this in MongoDB?</p>