How can I filter a 2d array in Swift?
<p>I'm trying to filter data from 2d array according to the string/text which is entered by user like if we write the name or phone number of a person it contact detail is searched and shown.</p>

<p><strong>In 2D array  [["Name","Phone number"]]. if number or name which is entered by the user is matched with any value then that will store in an other array.</strong></p>

<pre><code>var data : [[String]] = [["AB","+923476760226"],["Umair","+923366111830"],.......]
</code></pre>