title: How to set a variable equal to a json value from another variable excel vba
body: <p>The json I am parsing is at this URL <a href="https://reqres.in/api/users?page=2" rel="nofollow noreferrer">https://reqres.in/api/users?page=2</a>. I am using the following code to parse it.</p>
  
  <pre><code>Option Explicit
  
  Sub Test_LateBinding()
  
  Dim objRequest As Object
  Dim strUrl As String
  Dim blnAsync As Boolean
  Dim strResponse As String
  
  Set objRequest = CreateObject("MSXML2.XMLHTTP")
  strUrl = "https://reqres.in/api/users?page=2"
  blnAsync = True
  
  With objRequest
      .Open "GET", strUrl, blnAsync
      .SetRequestHeader "Content-Type", "application/json"
      .Send
      'spin wheels whilst waiting for response
      While objRequest.readyState &lt;&gt; 4
          DoEvents
      Wend
      strResponse = .ResponseText
  End With
  
  Debug.Print strResponse
  
  End Sub
  </code></pre>
  
  <p>I can successfully get the json into the strResponse variable. But lets say I want a variable that is equal to "Eve" which is under first name in the json string. How can I set a variable firstName = "Eve" from that json string.</p>