title: Populate Select With OptGroup From Two Seperate JSon Objects JQuery
body: <p>I have two json objects</p>
  
  <pre><code>var type = [{"Id":1,"Name":"This is a name"}];
  var subType = [{"Id":2,"ParentId":1,"Name":"This is a name"},];
  </code></pre>
  
  <p>subType.ParentId references the type.Id</p>
  
  <p>I want to be able to populate a select in jQuery having</p>
  
  <pre><code>&lt;SELECT&gt; 
  &lt;OPTGROUP LABEL="type.Name" id="type.Id"&gt;        
  &lt;OPTION LABEL="subType.Name" value="subType.Id"&gt;subType.Name&lt;/OPTION&gt;                  
  &lt;/OPTGROUP&gt;
  &lt;/SELECT&gt;
  </code></pre>