title: VBA/JIRA/JSON: add new key/value to dictionary parsed from a JSON
body: <p>I am working on a piece of code to extract issues from a JIRA project and then loop through each issue to see if it already exists within an Excel sheet. For either outcome, I want to add a new key-value combination which will essentially tag whether the issue exists or not, e.g. "exists": "true".</p>
  
  <p>I am using the JSONConverter (VBA-JSON) code by Tim Hall to parse the JSON response into an Excel dictionary. Now I am struggling to understand the correct syntax in order to add the new key-value into the dictionary.</p>
  
  <p>Example JSON:</p>
  
  <pre><code>"issues": [{
        "expand": "operations,editmeta,changelog,transitions,renderedFields",
        "id": "123456789",
        "self": "url",
        "key": "XY-12345",
        "fields": {
              "issuetype": {
                        "self": "url",
                        "id": "1",
                        "description": descrip.",
                        "iconUrl": "url",
                        "name": "Story",
                        "subtask": false
                          },
                  },
             },
  </code></pre>
  
  <p>This is what I am trying to produce (if the dictionary was parsed back to JSON; see 'exists'):</p>
  
  <pre><code>"issues": [{
        "expand": "operations,editmeta,changelog,transitions,renderedFields",
        "id": "123456789",
        "self": "url",
        "key": "XY-12345",
        "exists": "true",
        "fields": {
              "issuetype": {
                        "self": "url",
                        "id": "1",
                        "description": descrip.",
                        "iconUrl": "url",
                        "name": "Story",
                        "subtask": false
                          },
                  },
             },
  </code></pre>
  
  <p>In terms of code, once I have retrieved the JSON from JIRA, I convert using:</p>
  
  <pre><code>Dim oDict as dictionary
  Set oDict = ParseJSON(sJSON)
  </code></pre>
  
  <p>And then I try to add the new item into the dictionary by looping through all issues:</p>
  
  <pre><code>for n=1 to oDict("issues").count
      If dotfind(oDict("issues")(n)("key"),"r",sht) = 0 Then '//function to search if key exists
          oDict.Add ("issues")(n)("exists"), "false"
      Else
          oDict.Add ("issues")(n)("exists"), "true"
      End if
  next n
  </code></pre>
  
  <p>In the end, I'd like to be able to call the below to get the value for exists</p>
  
  <pre><code>Cells(r,c) = oDict("issues")(n)("exists")
  </code></pre>