title: Item Array as Datasource for NgFor
body: <p>Just want to ask if is it possible to  search an item in an array of objects and use it as datasource for my angular table? Can you share the syntax please?</p>
  <p>Basically, i have an array of objects consisting of Id and its json file. Populate its data. Look for an item that matches the it, and use it as datasource in a ngfor grid.</p>
  <p>I have the following code, but it returns compilation error.</p>
  <p>Thanks</p>
  <p>ts file</p>
  <pre><code>jsonData: Array&lt;{ id: string, json: object }&gt; = [];
  ngOnInit(): void {
  let json= [
    {
      &quot;Id&quot;: &quot;1&quot;,
      &quot;Col1&quot;: &quot;val11&quot;,
      &quot;Col2&quot;: &quot;val12
    },
    {
      &quot;Id&quot;: &quot;2&quot;,
      &quot;Col1&quot;: &quot;val21&quot;,
      &quot;Col2&quot;: &quot;val22
    }
  ]
  
  this.jsonData.push({ id: &quot;100&quot;, json: json });
  }
  </code></pre>
  <p>html file</p>
  <pre><code>&lt;ng-container *ngFor=&quot;let row of this.jsonData.find(e =&gt; e.id === &quot;101&quot;).json;let i=row.Id&quot;&gt;
          row.Col1 //etc..
  &lt;/ng-container&gt;
  </code></pre>