Micro Focus QTP (UFT) Forums
[VBScript] Json: get VALUE by NAME - Printable Version

+- Micro Focus QTP (UFT) Forums (https://www.learnqtp.com/forums)
+-- Forum: Micro Focus UFT (earlier known as QTP) (https://www.learnqtp.com/forums/Forum-Micro-Focus-UFT-earlier-known-as-QTP)
+--- Forum: UFT / QTP Beginners (https://www.learnqtp.com/forums/Forum-UFT-QTP-Beginners)
+--- Thread: [VBScript] Json: get VALUE by NAME (/Thread-VBScript-Json-get-VALUE-by-NAME)



[VBScript] Json: get VALUE by NAME - robertosalemi - 02-25-2016

Hi,
I have this Json
Code:
[{
    "SysName": "mySysName1",
    "SysLink": "mySysLink1"
}, {
    "SysName": "mySysName2",
    "SysLink": "mySysLink2"
}, {
    "SysName": "mySysName2",
    "SysLink": "mySysLink2"
}]

How can I get all value of "SysName" node/name?
How can I use ReGex?

This not works:
Code:
Set re = New RegExp


    re.Pattern = "/SysName(.*)/"
    re.Global = True
    re.IgnoreCase = True


For Each m In re.Execute(myJson)


    Wscript.echo m.value


Next

Thanks.