title: angular 5 *ngFor two array (merge objects of two arrays to make single array of objects)
body: <p>I am getting array from two get method in angular 5. What i want is to combine those two arrays (JSON) into one array and print it in a single for loop</p>
  
  <p>my two arrays:-</p>
  
  <pre><code>servers3 =[
  {
    sub:'sub',
    subDesc:'subDesc'
  }];
  
  public tableData:any;
  </code></pre>
  
  <p>i am using concat two combine two arrays like follows</p>
  
  <pre><code>&lt;table&gt;
    &lt;tr&gt;
      &lt;th&gt;fileName&lt;/th&gt;
      &lt;th&gt;icon&lt;/th&gt;
      &lt;th&gt;fullPath&lt;/th&gt;
      &lt;th&gt;sub&lt;/th&gt;
      &lt;th&gt;subDesc&lt;/th&gt;
      &lt;th&gt;image&lt;/th&gt;
    &lt;/tr&gt;
    &lt;tr *ngFor="let item of tableData.concat(servers3)"&gt;
      &lt;td&gt;{{item?.fileName}}&lt;/td&gt;
      &lt;td&gt;{{item?.icon}} &lt;/td&gt;
      &lt;td&gt;{{item?.fullPath}}&lt;/td&gt;
      &lt;td&gt;{{item?.sub}}&lt;/td&gt;
      &lt;td&gt;{{item?.subDesc}}&lt;/td&gt;
      &lt;td&gt;&lt;img src="{{item?.fullPath}}" width="200px" height="200px" alt="adawdawd"/&gt;&lt;/td&gt;
    &lt;/tr&gt;
  &lt;/table&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>And i am getting output as follows:-</p>
  
  <p><a href="https://i.stack.imgur.com/wHVrd.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/wHVrd.png" alt="enter image description here"></a></p>
  
  <p>as you can see its not showing in one line 
  each array completes individually</p>
  
  <p>please give me solution if any one know the answer
  thank you in advance </p>