A Yaak plugin that allows you to get a value from a comma separated list by index
Adds a small template function to Yaak that lets you pick a value from a comma-separated list by index.
array.value(data, key?)0)Returns the selected item as a string (trimmed), or null if the index is out of range.
Given this list:
data: first, second, thirdYou can select values like:
${[ array.value(data: "first, second, third") ]}
// first
Select a specific index:
${[ array.value("first, second, third", "2") ]}
// third
You can also use the value to fetch ..the value. It does a lowercase match:
${[ array.value("First, Second, Third", "second") ]}
// Second
Contributions are welcome! Please feel free to submit a Pull Request.
MIT