title: Logic Apps liquid template ask
body: <p>I am a complete newcomer to Liquid, started playing with it a few hours ago.</p>
  
  <p>i am trying to parse a JSON and extract certain key value pairs out of it, yet i am not successful at all. the JSON is outputed from Azure Form Recognizer, and i am trying to do a Liquid json 2 json in Logic Apps.</p>
  
  <p>the JSON looks like this</p>
  
  <pre><code>{
    "status": "success",
    "pages": [
      {
        "number": 1,
        "keyValuePairs": [
          {
            "key": [
              {
                "text": "Page No:",
                "boundingBox": [
                  507.4
                 ]
              }
            ],
            "value": [
              {
                "text": "1",
                "boundingBox": [
                  586.8
                ],
                "confidence": 1.0
              }
            ]
          },
  ....
  ...
  </code></pre>
  
  <p>what i am looking for is to loop through the keyValuePairs array, and then pull the "text" element from the "key" array, and the "text"+"confidence" element from the "value"array.</p>
  
  <p>Could you please help me in understanding the approach here? I tried something like this, but the array comes back empty</p>
  
  <pre><code>{
  "results":[
  {% for kvp in content.keyValuePairs  %}
  
  {% for mykey in kvp.key  %}
  
  "thiskey":"{{mykey.text}}
  {%- endfor -%}
  {% for myval in kvp.value  %}
  
  "thisvalue":{{myval.text}}
  "thisconfidence":{{myval.confidence}}
  {%- endfor -%}
  {%- endfor -%}
  ]
  }
  </code></pre>
  
  <p>And second question: what's the best approach for debugging Liquid, so i can see where i am getting it wrong and adjust?</p>
  
  <p>Thank you!</p>