title: How to turn an array of objects in to tabular data?
body: <p>I have an array of objects:-</p>
  
  <pre><code>[{
      "TaAddClaim": {
          "claim_id": "CL462573115516",
          "date": "2016-11-08"
      },
      "Employee": {
          "full_name": "Admin User"
      }
  }, {
      "TaAddClaim": {
          "claim_id": "CL67258688282",
          "date": "2016-11-08"
      },
      "Employee": {
          "full_name": "Admin User"
      }
  }, {
      "TaPassAccount": {
          "claim_id": "CL462573115516"
      },
      "0": {
          "total_expenses": "4436.00"
      }
  }, {
      "TaPassAccount": {
          "claim_id": "CL67258688282"
      },
      "0": {
          "total_expenses": "3236.00"
      }
  }]
  </code></pre>
  
  <p>I want to display these data in a <code>HTML</code> table. My table structure is as follows:</p>
  
  <pre><code>$.each(resp, function(indx, obj) {
      if (obj.TaAddClaim) {
          table += '&lt;tr&gt;';
          table += '&lt;td&gt;' + obj.TaAddClaim.claim_id + '&lt;/td&gt;';
          table += '&lt;td&gt;' + obj.TaAddClaim.date + '&lt;/td&gt;';
          table += '&lt;td&gt;' + obj.Employee.full_name + '&lt;/td&gt;';
      }
  });
  </code></pre>
  
  <p>Now the problem is I am unable to display the <code>total_expenses</code> data in the table. </p>
  
  <p>I want to display the <code>total_expenses</code> data if the <code>claim_id</code> of <code>TaAddClaim</code> is match with the <code>claim_id</code> of <code>TaPassAccount</code>.</p>
  
  <p>Thanks in advance.</p>