contentOffsetForScrollingToRowAtIndexPath in swift
<p>i getting some response which contains some information, i stored value in dictionary format in NSMutableArray for example</p>

<pre><code>{name :david, email : xxx.com},{name: david, email : yay.com},{name : david, email : zzz.com} {name: Annie, email : annie.com},{name: George, email : ger.com}
</code></pre>

<p>i have two label Name and Email. when i press Label Action i displayed all the usernames in that i selecting name as "daniel" </p>

<p>Now i going for second label called Email Action in that i want only email list of "daniel" its contains three mail i have to displayed in tableview</p>

<p>here i tried this code but didn't worked for me </p>

<pre><code>let data = NameList.filter{($0 as! [String:String])["Name"]!.containsString(NameLabel.text!)}.map { x in return x["email"]!}
            //                print(data)


 detailsArray = data
</code></pre>

<p>my output log as follows : </p>

<blockquote>
  <p>*** Terminating app due to uncaught exception 'NSRangeException',
  reason: '-[UITableView
  _contentOffsetForScrollingToRowAtIndexPath:atScrollPosition:]: row (2) beyond bounds (1) for section (0).</p>
</blockquote>