Closed RaviRamDhali closed 7 years ago
I have a Json object posted to an asp page.
I need to parse the json object and get each key/property.
Code example (not working)
Dim jsonString jsonString = {"date":"4/28/2017","custType":"100","vehicle":"1"} Dim jsonObj, outputObj set jsonObj = new JSONobject set outputObj = jsonObj.parse(jsonString) response.write("<li> date :" & outputObj.date & "</li>") response.write("<li> custType :" & outputObj.custType & "</li>") response.write("<li> vehicle :" & outputObj.vehicle & "</li>")
Microsoft VBScript runtime error '800a01b6' Object doesn't support this property or method: 'date '
How can I get the key/value from the Json String some way?
Working Code:
response.write("<li> date :" & outputObj("date") & "</li>") response.write("<li> custType :" & outputObj("custType") & "</li>") response.write("<li> vehicle :" & outputObj("vehicle") & "</li>")
I have a Json object posted to an asp page.
I need to parse the json object and get each key/property.
Code example (not working)
Microsoft VBScript runtime error '800a01b6' Object doesn't support this property or method: 'date '
How can I get the key/value from the Json String some way?