title: Dynamic mapping in Dataweave
body: <p>I'm trying to map a column name dynamically in Dataweave using the contents of a flow variable. The static version of what I'm trying to achieve looks something like:</p>
  
  <pre><code>payload map ((payload01 , indexOfPayload01) -&gt; {
      COLUMNA: payload01.INPUTA
  })
  </code></pre>
  
  <p>Now the part that I need to be dynamic is <code>INPUTA</code> - I need the <code>A</code> to be derived from a flow variable that is set prior to the Dataweave component. I've tried something like:</p>
  
  <pre><code>payload map ((payload01 , indexOfPayload01) -&gt; {
      COLUMNA: payload01.INPUT#flowVars['varName']
  })
  </code></pre>
  
  <p>But I'm getting a <code>com.mulesoft.weave.grammar.InvalidNamespacePrefixException</code> error.</p>
  
  <p>Is this possible to achieve in Dataweave? Can't seem to find any relevant docs describing how.</p>