Reputation: 33
On karate 0.6.0, the following code returned an array with all the ids:
def wishlist = get.response.wishlist_products
ids = wishlist[*].product_info.id
now on version 0.9.0 the same returns the following error:
wishlist[*].product_info.id, :1:9 Expected an operand but found *
Can someone tell me what change?
Thanks!
Upvotes: 1
Views: 2318
Reputation: 410
You must use the get
keyword to save the results of a JsonPath expression as described in the docs.
* def ids = get wishlist[*].product_info.id
Upvotes: 2