Philipp Gorkiewicz
03/28/2025, 7:49 AM{{val (pickRandom (range 1 50) count=5) assign='randomNumbers'}}
sort the values in randomNumbers array?
Question 2: is it possible to access an array index via a variable?
{{val (array 'foo' 'bar') assign='testArray'}}
{{val 1 assign='index'}}
{{testArray.index}} --> possible?
{{testArray.1}} -> works
I'm using the latest version of WireMock (3.12.1)
thank you very much for your help and wish you a great day!Tom
03/28/2025, 10:52 AMsort
help available at the moment unfortunately. It definitely seems like it’d be a great addition to WireMock if you feel like opening a PR?
For your second question, here’s how you do it:
{{val (array 'foo' 'bar') assign='testArray'}}
{{val 1 assign='index'}}
{{lookup testArray index}}
Philipp Gorkiewicz
03/28/2025, 11:54 AMPhilipp Gorkiewicz
03/30/2025, 1:21 PMLuis Copetti
04/11/2025, 1:24 PMPhilipp Gorkiewicz
04/11/2025, 1:48 PM