I am getting error while retrieving values A,B, C using jsonpath
Error:
karate.jsonPath(response, "$.code[*~]"), com.jayway.jsonpath.InvalidPathException: Expected wildcard token to end with ']'
- def value = karate.jsonPath(response, "$.code[*~]")
- def value_expected = ["A","B","C"]
- match value contains only value_expected
Response is as below:
{
"code": {
"A": [
{
"codeValue": 510575,
"Key": "XYZ"
}
],
"B": [
{
"codeValue": 510575,
"Key": "XYZ"
}
],
"C": [
{
"codeValue": 510575,
"Key": "XYZ"
}
]
}
}