title: How to run inline code within a logic app?
body: <p>I have 2 variables json array </p>
  
  <pre><code>variable1 = 
  [
    {
      "CurrentDate": "2019-05-11",
      "CurrentTime": "01:09:14",
      "tablename": "A"
    },
    {
      "CurrentDate": "2019-05-11",
      "CurrentTime": "01:11:14",
      "tablename": "Z"
    }
  ]
  
  variable2 =
  [
    {
      "A": "Topic1"
    },
    {
      "Z": "Topic2"
    }
  ]
  </code></pre>
  
  <p>Now I want to compare <code>tablename</code> value with <code>variable2</code> key and if it matches pass <code>variable2</code> value to next step.</p>
  
  <p>For example, in <code>variable1</code> for each loop it will take tablename value <code>A</code> checks with <code>variable2</code> array each element and key matches for <code>A</code> then I need to pass its value as <code>Topic1</code> to next step or assign a value to global variable. Same happens for all the elements one by one.</p>
  
  <p>I tried using 2 foreach but unable to assign values. How can I write an expression to match value and assign global value after match to variable?</p>
  
  <p>If this is not possible I will modify variable2 like</p>
  
  <pre><code>  variable2 =
      [
       "A" , "B"
      ] and add equal expression like   "equals": [
                                                  "@items('For_each')?['tablename']",
                                                  "@items('For_each_2')"
                                              ]
  </code></pre>
  
  <p><a href="https://i.stack.imgur.com/gEAPR.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/gEAPR.png" alt="enter image description here"></a></p>