Verify element property fails when there is a hyphen in json element name


#1

Operating System : Windows 10
Katalon Studio Version : 5.10.1
Environment : API testing

I have json elements like
"created-by": “abc”,
"updated-by": "xyz"

When I use
WS.verifyElementPropertyValue(response, ‘[0].updated-by’, ''xyz")
I get Verification FAILED
Reason:
com.kms.katalon.core.exception.StepFailedException: Unable to verify element property value (Root cause: Variable ‘by’ is not defined for test case.)
and when i use
WS.verifyElementPropertyValue(response, ‘[0][“updated-by”]’, ‘xyz’)
i get
Unable to verify element property value (Root cause: org.codehaus.groovy.control.MultipleCompilationErrorsException: startup failed:
Script1.groovy: 1: unexpected token: [ @ line 1, column 93.
rseText(jsonText);return root.[0]["updat

this is the thread where i have asked a question and got to know it is a bug