title: JSONata prevent array flattening
body: <p>Q: How do I prevent JSONata from "auto-flattening" arrays in an array constructor? </p>
  
  <p>Given JSON data:</p>
  
  <pre><code>{
    "w" : true,
    "x":["a", "b"],
    "y":[1, 2, 3],
    "z": 9
  }
  </code></pre>
  
  <p>the JSONata query seems to select 4 values:</p>
  
  <pre><code>[$.w, $.x, $.y, $.z]
  </code></pre>
  
  <p>The nested arrays at $.x and $.y are getting flattened/inlined into my outer wrapper, resulting in more than 4 values:</p>
  
  <pre><code>[ true, "a", "b", 1, 2, 3, 9 ]
  </code></pre>
  
  <p>The results I would like to achieve are</p>
  
  <pre><code>[ true, ["a", "b"], [1, 2, 3], 9 ]
  </code></pre>
  
  <p>I can achieve this by using</p>
  
  <pre><code>[$.w, [$.x], [$.y], $.z]
  </code></pre>
  
  <p>But this requires me to know <em>a priori</em> that $.x and $.y are arrays. </p>
  
  <p>I would like to select 4 values and have the resulting array contain exactly 4 values, independent of the types of values that are selected. </p>
  
  <p>There are clearly some things about the interactions between JSONata sequences and arrays that I can't get my head around. </p>