title: Pushing items to an array with multiple if cases in Angular
body: <p>I am new to TypeScript and working on an Angular project.</p>
  <p>I am making an API call and making few operations on the data received:</p>
  <pre><code>public data_Config: IConfig[] = [];
  
  this.getService.Data(input).subscribe(
      data =&gt; {
          this.data_Config = data;
          this.data_Config.forEach(itm =&gt; { 
              if(itm.aFl == 'Y'){
                  itm.Levels.push('A')
              }
              if(itm.bFl == 'Y'){
                  itm.Levels.push('B')
              }
              if(itm.cFl == 'Y'){
                  itm.Levels.push('C')
              }
          });
          this.dataSource_prgmConfiguration = new MatTableDataSource(this.data_prgmConfiguration);
          this.dataSource_prgmConfiguration.paginator = this.paginatorPrgmConfiguration;
          this.dataSource_prgmConfiguration.sort = this.sortPrgmConfiguration;
  });
  </code></pre>
  <p><code>IConfig</code> has several properties including 10-12 flag properties like<code>aFl</code>,<code>bFl</code>,<code>cFl</code>. Among the Flag properties which ever are true I want to add them to an array. I have done it in a simple way using if condition, but with 11-12 flags as many if conditions will be required, is there any better way to implement this?</p>
  <h3>Adding IConfig</h3>
  <pre><code>export interface IConfig {
      TypeNm: string;
      aFl: string;
      bFl: string;
      cFl: string;
      dFl: string;
      eFl: string;
      fFl: string;
      gFl: string;
      hFl: string;
      PlaceHolder: string;
      Association: string;
      ActiveFl: string;
      Actions: string;
      AssociatedProgramsStr?: string;
      Levels?: string[];
  }
  </code></pre>