title: Get the index out of AnyObject list of items IOS
body: <p>parsed is an NsDictionary and I am pulling the balances out of it via</p>
  
  <p>if let findbalances: AnyObject = parsed["balances"]</p>
  
  <p>which gives me a list of balances in AnyObject  format</p>
  
  <pre><code>(
      {
      "available_amount" = 133519;
      currency = AUD;
  },
      {
      "available_amount" = 7854;
      currency = CAD;
  },
      {
      "available_amount" = 88581;
      currency = EUR;
  },
      {
      "available_amount" = 0;
      currency = GBP;
  },
      {
      "available_amount" = 63618;
      currency = INR;
  },
      {
      "available_amount" = 375;
      currency = NZD;
  },
      {
      "available_amount" = 0;
      currency = TRY; 
  },
      {
  
      "available_amount" = 2918958;
      currency = USD;
  
  }
  )
  </code></pre>
  
  <p>I know that </p>
  
  <pre><code>let whatCurrency = (findbalances[7]["currency"] as! String)
  </code></pre>
  
  <p>=USD  But how do I find  that value [7]  if the  amount of  objects  changes?</p>
  
  <p>I want to match on USD  </p>
  
  <p>I tried </p>
  
  <pre><code>let  defaultcurr = "USD"
  let findUSD = findbalances.indexOfObject(defaultcurr)
  </code></pre>
  
  <p>but that gave me  9223372036854775807</p>
  
  <p>How do I just  find 7</p>