title: Jsonata, merging array of objects
body: <p>I have an array of objects that I would like to reformat using a jsonata expression</p>
  
  <pre><code>{
      "items": [
          {
              "time": 1575417919282,
              "message": {
                  "data": 21,
                  "type": "temperature"
              }
  
          },
          {
              "time": 1575417919282,
              "message": {
                  "data": 45,
                  "type": "temperature"
              }
  
          }
      ]
  }
  </code></pre>
  
  <p>Desired format</p>
  
  <pre><code>[
      {
          "data": 21,
          "type": "temperature",
          "time": 1575417919282
      },
      {
          "data": 45,
          "type": "temperature"
          "time": 1575417919282
      }
  ]
  
  </code></pre>
  
  <p>Is there an easy one liner for this? I started with merging time into the message object using <code>$merge([$.items.message, {"time":$.items.time}])</code> but his gives me</p>
  
  <pre><code>{
    "data": 45,
    "type": "temperature",
    "time": [
      1575417919282,
      1575417919282
    ]
  }
  </code></pre>
  
  <p>I'm finding the documentation hard to follow. How do you start with just merging two objects iteratively? </p>