title: How to save Cytoscape network as flat JSON?
body: <p><strong>How can I save a Cytoscape network as a flat JSON file?</strong></p>
  <p>The <code>cytoscape.js</code> examples at <a href="https://js.cytoscape.org/" rel="nofollow noreferrer">cytoscape.org</a> typically store the underlying network data as a flat <code>data.json</code> file (e.g. <a href="https://github.com/cytoscape/cytoscape.js/tree/master/documentation/demos/colajs-graph" rel="nofollow noreferrer">colas-graph</a>, see also <a href="https://js.cytoscape.org/#notation/elements-json" rel="nofollow noreferrer">https://js.cytoscape.org/#notation/elements-json</a>).</p>
  <p>This is in contrast to the grouped or keyed format obtained when saving a graph as a Cytoscape JSON file (in Cytoscape: <code>file &gt; Export &gt; Network to File &gt; Cytoscape JSON (*.cyjs))</code>.</p>
  <p><strong>Note:</strong> the <a href="https://js.cytoscape.org/#cy.json" rel="nofollow noreferrer">documentation</a> indicates that I can use <code>cy.json()</code> to export a JSON representation of the graph, but I am unsure how to call this command (I am relatively new to javascript).</p>