title: how to iterate through json array
body: <p><strong>How do we iterate through the <code>Map</code> array?</strong></p>
  
  <p>My payload looks like this:</p>
  
  <pre><code>{
    "Record": "...bunch of hl7 data...",
    "Map": [{ "DG1.2": "PatientDiag1" }, { "DG1.3": "PatientDiag2" }]
  }
  </code></pre>
  
  <p><strong>How do we iterate and parse the values of the <code>Map</code> array?</strong></p>
  
  <p>I've tried the following:</p>
  
  <pre><code>var blobObject = JObject.Parse(blob); 
  var map = blobObject["Map"];  //it's a JToken at this point
  //now let's parse each key/value pair in the map:
  foreach (var field in map)
  {
  
      var key = field.ToString();
      var value = field[0].Value
  }
  </code></pre>