0

I have to read a JSON file from a folder and fetch the value of parameter "result" under the array "results". I am not able to read the parameters from JSON array. Below is my json file saved in C folder. I have to use the code in UFT or QTP

    {
  "summary": {
    "numFailed": 0,
    "avgLatency": 59672,
  },
  "settings": {
    "server": 1,
    "r": 0,
    "port": 9999,
   
  },
  "results": [
    {
      "result": "SUCCESSFUL",
    
    },
    {
      "result": "SUCCESSFUL",
      "duration": 0,
    }
  ]
}```

I read JSON file but not able to fetch array values

Set fso = CreateObject("Scripting.FileSystemObject")

json = OpenTextFile("C:\new\net.json").ReadAll

user3826914
  • 63
  • 1
  • 1
  • 7

0 Answers0