title: Logic App designer removes foreach loop without error or exception
body: <p>I have a logic app that uses a webhook trigger on a service bus message queue to post selected messages to an API app using a HTTP+Swagger action.</p>
  
  <p><a href="https://i.stack.imgur.com/HVpbT.png" rel="nofollow noreferrer">Azure Logic App Designer</a></p>
  
  <p>Here’s the json array (DBChanges) from the triggerBody that the foreach is supposed to iterate over</p>
  
  <pre><code>"DBChanges":[{"Key":"ItemID","Value":"101"},{"Key":"Description","Value":"Decript the message"},{"Key":"Owner","Value":"Samuel"}]
  </code></pre>
  
  <p>This is the logic app code for the DBChanges POST.  The foreach loop is supposed to iterate over all the elements of the DBChanges array which is a key, value pair in the swagger metadata.</p>
  
  <p><a href="https://i.stack.imgur.com/dQCVA.png" rel="nofollow noreferrer">Azure Logic App Code View</a></p>
  
  <p>When I switch to design mode after adding the foreach loop the designer strips the foreach code out even though it appears syntactically correct.</p>
  
  <p>Does anyone know why the logic app designer strips out the foreach when switching between Design and Code views?</p>