title: <Mule - DataWeave> Reference to variables where the variable name is dynamic
body: <p>Hi I would like to seek for assistance for a DataWeave usage scenario.</p>
  
  <p>I need to check if a variable for a card name exists (the card name is dynamic and cannot forsee beforehand).<br/>
  If the variable already exists, then append current payload to that card name variable;<br/>
  Else create the variable  with the current payload</p>
  
  <p>The problem is I do not have idea on how to refer to a variable with dynamic name.<br/>
  I can save the current card name to a variable say "cardName", but how can I refer to the variable in DataWeave code afterwards?</p>
  
  <p>Pseudoly below is what I would like to achieve</p>
  
  <p><a href="https://i.stack.imgur.com/dFdd9.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/dFdd9.png" alt="enter image description here"></a></p>
  
  <p><a href="https://i.stack.imgur.com/GTCN6.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/GTCN6.png" alt="enter image description here"></a></p>
  
  <p>May I seek for advice on the way to achieve it?</p>