title: Change property in array with Spread Operator returns object instead of array
body: <p>I want to change the property of an object similar to this, this is a simplified object with a few properties of the original:</p>
  
  <pre><code> state = {
      pivotComuns: [
        {
          id: 1,
          enabled : true
        },
        {
        id: 2,
        enabled : true
       }
     ],
     otherProperties : "otherProperties"
   }
  </code></pre>
  
  <p>I'm changing the state of enabled like this:</p>
  
  <pre><code> state = {
              ...state,
              pivotColumns: {
                ...state.pivotColumns,
                [2]: {
                  ...state.pivotColumns[2], enabled: !state.pivotColumns[2].enabled
                }
              }
            }
  </code></pre>
  
  <p>It works, but instead of return an array like I is the pivotComuns property it returns an object, "notice that I change [] for {}":</p>
  
  <pre><code>state = {
          pivotComuns: {
            {
              id: 1
              enabled : true
            },
            {
            id: 2,
            enabled : true
           }
         },
         otherProperties : "otherProperties"
       }
  </code></pre>
  
  <p>What I'm doing wrong, I need to keep that property an array.</p>