title: Remove values from dictionary in iOS swift
body: <p>I have a JSON object as such: </p>
  
  <pre><code>The Result {
      shops = ({
          date = "2015-07-22T14:14:48.867618";
          "num_items" = 0;
          score = "-1";
          "total_spend" = 0;
      },
      {
          date = "2015-07-22T14:17:03.713194";
          "num_items" = 1;
          score = 5;
          "total_spend" = "1.85";
      });
  }
  </code></pre>
  
  <p>And My Code:</p>
  
  <pre><code>let dict = result as! NSDictionary
  var mutDict: NSMutableDictionary = dict.mutableCopy() as!     NSMutableDictionary
  
  for (key, value) in mutDict {
      for i in 0..&lt;backendArray.count {
          if value[i].objectForKey("num_items") === 0
              {
                  //delete that shop only
              }
       }       
  }
  </code></pre>
  
  <p>I want to delete the whole first shop and all of it's contents, but not the second shop or the shops.</p>
  
  <p>I don't want to turn it into an Array, because I can't figure out how to turn it back. Data needs to be stored still as a Dictionary. Thanks</p>