title: Remove a subdocument nested in an array in MongoDB
body: <p>I want to remove this:  </p>
  
  <pre class="lang-json prettyprint-override"><code>{
  "val" : NumberLong(200),
  "chId" : 2,
  "reqSys" : "222220005031",
  "old" : NumberLong(223),
  "isRb" : false
  },
  </code></pre>
  
  <p>from this:  </p>
  
  <pre class="lang-json prettyprint-override"><code>{
  "_id" : ObjectId("52d7c25480f0a83293adbbbc"),
  "d" : 2014001,
  "m" : 123456789,
  "topups" : {
      "data" : [
              {
                      "val" : NumberLong(200),
                      "chId" : 2,
                      "reqSys" : "222220005031",
                      "old" : NumberLong(223),
                      "isRb" : false
              },
              {
                      "val" : NumberLong(150),
                      "chId" : 2,
                      "reqSys" : "222220005031",
                      "old" : NumberLong(166),
                      "isRb" : false
              }
      ],
      "total" : {
              "cnt" : 2,
              "revenue" : NumberLong(3500000)
      }
  }
  </code></pre>
  
  <p>I would like to find the object by querying <code>{d:2014001, m:123456789}</code> and remove the whole object in the data array that has "val":200 if that is possible in one command. But if not, multiple commands work for me also. Have tried with $pull and $pullAll but I am missing something.</p>