title: Is there a good way to combine array and object in JavaScript?
body: <p>There is an object and an array.</p>
  
  <pre><code>list: [
    {
      oldData: {
        title: 'abc',
        id: 1,
        date: '1982-09-30',
        budget: 250000,
      },
      newData: [
        {
          key: 1,
          data: null,
          value: 5,
        },
        {
          key: 2,
          data: null,
          value: 22,
        },
        ...
      ],
    },
    {
      oldData: {
        title: 'blablablaaaaa',
        id: 2,
        date: '2012-02-23',
        budget: 350000,
      },
      newData: [
        {
          key: 1,
          data: null,
          value: 35,
        },
        {
          key: 2,
          data: null,
          value: 41,
        },
        ...
      ],
    },
    ... some more datas...
  ]
  </code></pre>
  
  <p>as above, There is more data of the same type.</p>
  
  <p>I need to use <code>oldData and newData</code> together, so I want to combine the two.</p>
  
  <p>How can I combine <code>oldData and newData</code> so that there are multiple sets of <code>oldData and newData pairs</code>?</p>
  
  <p>for example, <code>[{ combineData: {...} }, { combineData: {...} }, ... }]</code> here.</p>
  
  <p>I know how to combine array and array, object and object, but I do not know how to do that.</p>
  
  <p>Is there any good solution?</p>