Scenario: jsonPath demo
* def jsonRequest =
"""
{
"name": "Test",
"description": "Test Desc",
"data": [
{
"language": "French",
"messageText": "Warning",
"helpText": "helpText 1"
},
{
"language": "German",
"messageText": "Warning2",
"helpText": "helpText 2"
},
{
"language": "English",
"messageText": "Warning3",
"helpText": "helpText 3"
}
]
}
"""
And print " jsonRequest.translationList[*].messageText ", karate.jsonPath(jsonRequest, "$.data[*].language") // it works and output is ["French","German","English"]
And print " jsonRequest.translationList[*].messageText ", jsonRequest.data[*].language // this does not work.
I am looking for the output ["French","German","English"] without using karate.jsonPath(), do we have any shortcut approach to get the same output when using karate.jsonPath().