Obtain a subset of tuple array in swift
<p>I have a array of tuples like the following</p>

<pre><code>var customProducts = [(productType: String, info:[String:AnyObject?])]
</code></pre>

<p>The parameter "productType" works like a "product category", like fruits, grains, beverage, etc. </p>

<p>The parameter "info" is a dictionary of nutritional information of the product.</p>

<p>I want to get a subset of the tuples array, based on the productType so I could obtain just the "info" dictionary for an specific productType. In C# I would try something like the following using Linq:</p>

<pre><code>var fruits = customProducts.Where(q=&gt;q.productType == "fruit").Select(q =&gt; q.info) as List&lt;KeyValuePair&lt;string, object&gt;&gt;;
</code></pre>

<p>How may I archive the same results using Swift (2.x)?</p>

<p>Thanks!</p>