title: Parsing JSON array in Excel VBA
body: <p>I have tried to follow the method in another thread, however there are certain part in the code that I don't understand and it didn't work for me. And I could comment as I haven't reached 50 reputations. (i included the response from the other thread)</p>
  
  <p>I am trying to access to Json response as below, I would like to get the array after details into excel horizontally(column A1-A6), however in the other post, I don't understand what the script control method. </p>
  
  <p>And there wasn't any comment line to explain what is it. And I tried to use it, the code just failed at sc.Eval "var obj=(" &amp; json &amp; ")"</p>
  
  <p>Also, the line json = {get your json here} failed, instead i replaced that to Json = resp , where resp is the output returned from the API.</p>
  
  <p>Your help is greatly appreciated. </p>
  
  <pre><code>Sub Tester()
  
      Dim json As String
      Dim sc As Object
      Dim o
  
      Set sc = CreateObject("scriptcontrol")
      sc.Language = "JScript"
  
      json = {get your json here}
  
      sc.Eval "var obj=(" &amp; json &amp; ")" 'evaluate the json response
      'add some accessor functions
      sc.AddCode "function getSentenceCount(){return obj.sentences.length;}"
      sc.AddCode "function getSentence(i){return obj.sentences[i];}"
  
      Debug.Print sc.Run("getSentenceCount")
  
      Set o = sc.Run("getSentence", 0)
      Debug.Print o.trans, o.orig
  End Sub
  </code></pre>
  
  <p>JSON response from API</p>
  
  <pre><code>      {"details":[
        {
           "trade":"Micro",
           "trade_tenor":"5yr+"
        },
        {
           "trade":"Odd",
           "trade_tenor":"10yr+"
        },
        {
           "trade":"Round",
           "trade_tenor":"20yr+"
        }   ]}
  </code></pre>