title: Removing Key:Value Pairs From Mongodb
body: <p>I would like to remove all key/value pairs where the key is <code>url</code> from <strong>all documents</strong> inside a mongodb collection.</p>
  
  <p>I've been agonising over this all weekend and have only managed to partially solve it using <code>$unset</code>, but I'm struggling to access all items particularly key/values inside objects in <code>arrayKey</code> and also do it in one query/function (if possible).</p>
  
  <p>This is generally how each document looks. There sometimes may be more objects in the <code>arrayKey</code>, but other than that they're pretty similar:</p>
  
  <pre><code>    {
      "keyOne": "String",
      "keyTwo": 7,
      "keyThree": {
          "subKeyOne": "String",
          "url": "String"
      },
      "arrayKey": [
          {
              "arrayKeyOne":"String",
              "url": "String"
          },
          {
              "arrayKeyOne":"String",
              "url": "String"
          }
      ],
      "url":"String"
  }
  </code></pre>
  
  <p>Any help would be greatly appreciated. I'm still new to programming and mongodb so the documentation is a bit dense for a beginner.</p>
  
  <p>Thanks :)</p>