title: Having problem to desctructure my data on React
body: <p>The <code>upcomingWork</code> contains my apis data. What I want here is to insert this as an array to display it on my calendar, below are the example of structured data I want.</p>
  
  <p>Actually, the <code>upcomingWork</code> contains a lot of attributes but I just want to get those three attributes to display on my calendar.</p>
  
  <pre><code>const data = upcomingWork.map(u =&gt; u.id &amp;&amp; u.title &amp;&amp; u.created_at);
  </code></pre>
  
  <p>Example of array that I want to create from <code>data</code>.</p>
  
  <pre><code>  const events = [
      {
        id: 1,
        title: 'My event',
        start: new Date(2020, 4, 8, 10, 0),
        end: new Date(2020, 4, 8, 14, 0),
      },
    ];
  </code></pre>