My script below:
* def inputJson = createJson();
* print inputJson
* def customerName = karate.jsonPath(inputJson, "$.customerDetails[0]")
* print customerName
Gives me this error:
javascript evaluation failed: karate.jsonPath(inputJson, "$.customerDetails[0]"), Property ['customerDetails'] not found in path $
Eventhough the jsonPath is valid as shown below:
Wondering if anyone here has encountered the same? Could you kindly advise me how to rectify this? Thank you in advance.
Note: I printed the json in the console and used the same when I checked the jsonPath in my screenshot above. I also validated in JSON Lint the json I was using and it is a valid one.