title: Cypress cy.write push new items to an array throws "push is not a function" error
body: <p>Using the same code from <a href="https://docs.cypress.io/api/commands/writefile.html#Flags" rel="nofollow noreferrer">https://docs.cypress.io/api/commands/writefile.html#Flags</a></p>
  <pre><code>const filename = '/path/to/list.json'
  
  cy.readFile(filename).then((list) =&gt; {
    list.push({ item: 'example' })
    // write the merged array
    cy.writeFile(filename, list)
  })
  </code></pre>
  <p>#system throws:
  list.push is not a function</p>
  <pre><code>fixture file:/path/to/list.json
  {
      &quot;details&quot;: {
          &quot;name&quot;: &quot;abc&quot;,
          &quot;age&quot;: 20
      }
  }
  </code></pre>
  <p>expecting the list.json output as</p>
  <pre><code>{
      &quot;details&quot;: {
          &quot;name&quot;: &quot;abc&quot;,
          &quot;age&quot;: 20
      },
      &quot;item&quot;: &quot;example&quot;
  }
  </code></pre>
  <p>Has anyone tried to append an existing JSON file with the above code snap?
  If so please share with me your experience.
  Thanks</p>