title: How to add conditions on static JSON object using Type Script
body: <p>I am working an application in which I created a static JSON object array which contains parent child data. I am showing that data into dropdown list what I want to achieve here is I have different records whose status will be different like completed, cancelled or others. I just to show or hide options from dropdown list using these statuses. Here is my JSON code.</p>
  <pre><code>export const projectCardVerticalDropdown = [
    {
      nameSub: 'Information',
      children: [
        {
          icon: 'i-expand',
          name: 'See Expanded Project',
          code: 1,
        },
      ],
    },
  
    {
      nameSub: 'Schedule',
      children: [
        {
          icon: 'i-plus',
          name: 'add a new task',
          code: 2,
        },
        {
          icon: 'i-calendar-week',
          name: 'see schedule',
          code: 3,
        },
      ],
    },
    {
      nameSub: 'Project Templates',
      children: [
        {
          icon: 'i-copy-1',
          name: 'Clone Project',
          code: 4,
        },
        {
          icon: 'i-project_stage_initiation',
          name: 'Make Template From Project',
          code: 5,
        },
        {
          icon: 'i-recieved_files2',
          name: 'Apply Template to this Project',
          code: 6,
        },
      ],
    },
    {
      nameSub: 'Data',
      children: [
        {
          icon: 'i-file-invoice-1',
          name: 'see Proposal',
          code: 7,
        },
        {
          icon: 'i-images',
          name: 'See Project Photos',
          code: 8,
        },
        {
          icon: 'i-mail_attachment',
          name: 'See Project Files',
          code: 9,
        },
      ],
    },
    {
      nameSub: 'Edit',
      children: [
        {
          icon: 'i-check_mark',
          name: 'mark project complete',
          code: 10,
        },
        {
          icon: 'i-edit',
          name: 'Edit Project Details',
          code: 11,
        },
      ],
    },
  ];
  </code></pre>
  <p>Here is my Html and ts Code</p>
  <pre><code> verticalDropDownListData = projectCardVerticalDropdown;
  
  &lt;div class=&quot;f-column&quot; *ngFor=&quot;let item of verticalDropDownListData&quot;&gt;
                                              &lt;span class=&quot;hr&quot;&gt;
                                                &lt;small class=&quot;&quot;&gt;{{item.nameSub}}&lt;/small&gt;
                                              &lt;/span&gt;
                                              &lt;button data-testid=&quot;project-card-expand&quot; class=&quot;no-border&quot;
                                                (click)=&quot;selectedProjectInfo(project)&quot; *ngFor=&quot;let items of item.children&quot;
                                                (click)=&quot;selectedDropdownListData(items.code,cloneModal, project)&quot;&gt;
                                                &lt;i class=&quot;{{items.icon}}&quot;&gt;&lt;/i&gt;
                                                &lt;span&gt;{{items.name}}&lt;/span&gt;
                                              &lt;/button&gt;
                                            &lt;/div&gt;
  </code></pre>
  <p>I need to add check to show or hide options in JSON object array.</p>