'Parse, Decode, Consume JSON data

Dim testString
testString = "{""Result"":""Accepted"",""Data"":{""Item"":[""U134L0Ai1""],""Timestamp"":[1585656014394],""Status"":[0],""Value"":[7]}}"

Dim json
Set json = CreateObject("Vbsedit.JSON")
Set test = json.Parse(testString)

WScript.Echo test.Node("Data.Item.0")

Browse test,""

json.Close()

Sub Browse(item,indent)

If item.iscollection Then
  WScript.Echo indent & item.Name

  ForEach bb In item
   Browse bb,indent & vbTab
  Next
Else
  WScript.Echo indent & item.Name & ":#" & item.Value & "#"
EndIf
EndSub
search for scripts

VbsEdit contains all these sample scripts!


Download Now!



Download   Home   Scripts

Copyright © 2001-2024 adersοft