title: Convert array to an array object with some modifications
body: <p>i'm pretty beginner in the JavaScript and I really need help to convert an array to an array object. There are many examples here in stackOverflow, but I need some modidfication during this process, which is why I couldn't do anything</p>
  <p>For example I have:</p>
  <pre><code>data = [{id: 21, name: &quot;jack&quot;} , {id: 185, name: &quot;yas&quot;}]
  </code></pre>
  <p>and I need to convert it with something like that (id key change to student_id, and present = true, should be added), and the length of this array is dynamic and will change over time.</p>
  <pre><code>[
    {
      &quot;student_id&quot; : 21,
      &quot;present&quot; = true
     },
     {
      &quot;student_id&quot; : 185,
      &quot;present&quot; = true
     }  
  ]
  </code></pre>
  <p>I need to add these array object to:</p>
  <pre><code> const data: any = { 
      here....
    };
  </code></pre>
  <p>your help will be much appreciated.</p>