title: Combining AWS step function task and map outputs in to one array
body: <p>I have a task state that outputs the following:</p>
  <pre><code>&quot;batch&quot;: {
      &quot;batch&quot;: &quot;size&quot;,
      &quot;currentTimestamp&quot;: 1596205376
    },
  </code></pre>
  <p>and a map state out outputs an array:</p>
  <pre><code>&quot;batch&quot;: [
      {
        &quot;batch&quot;: &quot;product-batch-0&quot;,
        &quot;currentTimestamp&quot;: 1596205376
      },
      {
        &quot;batch&quot;: &quot;product-batch-1&quot;,
        &quot;currentTimestamp&quot;: 1596205376
      }
  ]
  </code></pre>
  <p>I would like to combine them so that the input to the state that follows the map state is this:</p>
  <pre><code>  &quot;batch&quot;: [
      {
      &quot;batch&quot;: &quot;Size&quot;,
      &quot;currentTimestamp&quot;: 1596205376
      },
      {
        &quot;batch&quot;: &quot;product-batch-22&quot;,
        &quot;currentTimestamp&quot;: 1596205376
      },
      {
        &quot;batch&quot;: &quot;product-batch-8&quot;,
        &quot;currentTimestamp&quot;: 1596205376
      }
  ]
  </code></pre>
  <p>Is this possible using the input/output processing available in aws step functions? I want to have them contained in one array so they can be processed together in an additional map state later in the state machine.</p>