Filter array of string (.where formatter)

I have an array and want to filter it. Example:

set-cookie is an array of strings. What is the “property” to value?

Solution:

Create an formatter extension:

exports.arrayItemStartsWith = function (array, itemStartsWith) {
return array.filter((item) => item.startsWith(itemStartsWith))
};

Used in data format like this:

arrayItemStartsWith(api.headers[‘set-cookie’], ‘TagOneCookie’)

Did you try $value?