title: VBA Parse String Response From API
body: <p>I'm getting below type of responses from an API:</p>
  <blockquote>
  <p>&quot;{&quot;success&quot;:false,&quot;error&quot;:&quot;Incorrect apikey&quot;}&quot;</p>
  <p>&quot;{&quot;success&quot;:true,&quot;error&quot;:&quot;Correct apikey&quot;}&quot;</p>
  </blockquote>
  <p>In VBA, how to know if response is true or false ?</p>
  <p>My current code is below and am getting response in <strong>hReq.ResponseText</strong> and it is not always fixed (more keys can be added to json). Although the part below is fixed and I have to get only if it returning true or false.</p>
  <blockquote>
  <p>&quot;{&quot;success&quot;:false</p>
  </blockquote>
  <p>Code:</p>
  <pre><code>Dim hReq As Object
  Dim strUrl As String
  strUrl = &quot;https://myWebAPI/myMethod?apikey=123456&quot;
  
  Set hReq = CreateObject(&quot;MSXML2.XMLHTTP&quot;)
  With hReq
      .Open &quot;GET&quot;, strUrl, False
      .Send
  End With
  
  MsgBox hReq.ResponseText
  </code></pre>
  <p>I know this is basic question but sorry am new to VBA.</p>