title: Array of objects with same key and different values using jQuery
body: <p>How to display <code>aliasName</code> based on array of objects?</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>var test = [{tableName:"EMP", aliasName:"E1"},
              {tableName:"EMP", aliasName:"E2"},
              {tableName:"DEPT", aliasName:"D"},
              {tableName:"EMP", aliasName:""},
             ]</code></pre>
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"&gt;&lt;/script&gt;
  &lt;table&gt;
  &lt;thead&gt;
    &lt;td&gt;Table Name&lt;/td&gt;
    &lt;td&gt;Alias Name&lt;/td&gt;
  &lt;/thead&gt;
  &lt;tbody&gt;
    &lt;tr&gt;
      &lt;td&gt;EMP&lt;/td&gt;
      &lt;td&gt;&lt;input type="text" class="alias" name="alias" data-table="t4" maxlength="30"&gt;&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td&gt;EMP&lt;/td&gt;
      &lt;td&gt;&lt;input type="text" class="alias" name="alias" data-table="t4" maxlength="30"&gt;&lt;/td&gt;
    &lt;/tr&gt;
     &lt;tr&gt;
      &lt;td&gt;DEPT&lt;/td&gt;
      &lt;td&gt;&lt;input type="text" class="alias" name="alias" data-table="t4" maxlength="30"&gt;&lt;/td&gt;
    &lt;/tr&gt;
     &lt;tr&gt;
      &lt;td&gt;EMP&lt;/td&gt;
      &lt;td&gt;&lt;input type="text" class="alias" name="alias" data-table="t4" maxlength="30"&gt;&lt;/td&gt;
    &lt;/tr&gt;
  &lt;/tbody&gt;
  &lt;/table&gt;</code></pre>
  </div>
  </div>
  </p>
  
  <p>How to display the alias names in input field based on table name using test. array?</p>