Firstly, any chance you could share a sample of the response bodies from env1 & env2 that include the elements you’re trying to locate.
I think expecting items to be located at an arbitrary location in an array is indeed very brittle, could you consider locating them by some sort of name or ID or anything else unique?
I did notice that the path to "dimensionName" : "Brand" for env1 is object►contents►0►mainNavigation►1►contents►0►contents►0►navigation►0►dimensionName
which isn’t the same path as you gave, but there was only one key/value pair like that so went with that instead.
I do assume that the value for @type is a good unique identifier to use to find the item in the contents and mainNavigation arrays. If it isn’t, you may want to select by another field.
Lastly, I was able to refine the command using the Chrome Dev Tools.
@VincentD123 You are my Man !!
With some changes I was able to get this script working. I will change all the existing scripts with similar logic to make it stable.
Thanks Again !!
Hey @vn0gdpo - if @VincentD123 helped to resolve your issue, feel free to mark his post as a Solution to help someone reading this thread more quickly resolve their own issues in the future