how can I access the elements and index in a for-each-loop in a custom script? in the other fields it is shown here How to use foreach loop in Apidog? - Apidog Docs but something like const idxStr = pm.globals.replaceIn(“{{$.7.index}}”); does not work…
how to access {{$.17.element}} in custom script? [solved]
found it to work with const idxStr = pm.variables.replaceIn(“{{$.7.index}}”);
Yes, it’s similar to how you get variables.