We are doing Rest API Testing through Katalon Studio and we are trying to validate product ids from the response. The json path that we got for product validation is “listPackage[1].cart[2].id” for which the index is static . But the response varies from time to time and the position of the cart id will not be the same.so we need to give the validations dynamically (irresepective of the index) such that if the response varies the script should not fail
Currently the code that i have written is "Response, ‘listPackage[0].cart[0].id’, ‘abc’ ". And the property that we are using is Verify Element Property Value(Response, ‘listPackage[0].cart[0].id’, ‘abc’). Now i want to make this dynamic such that if the indexing gets changed the script should not fail.
could you please give a solution for the same?