I have a use case where I need to iterate over a list of values from an Extension for Jira Service Management bundled field and then check the following conditions for each iteration:
- check whether the value is selected in a checkbox of an issue noting that not all values exist in the checkbox.
- check if the current value is the same as the previous value, if they are the same then skip and move to the next one.
The content of the bundled field is in an array like below where the actual values I want to extract are all in the even indexes. The values in the even indexes are also options in the checkbox but only all of them will be selected in the checkbox.
"subfield_10015": [
"option_10000",
"Solution A",
"option_10000",
"Solution A",
"option_10001",
"Solution B",
"option_10002",
"Solution B",
"option_10002",
"Solution C",
"option_10003",
"Solution D"
]
I have tried the followings:
- Using contains regular expression or contains.
This option only works if the first value has more than value. In case, where the first value has a single value, this will not work.

- Using JQL condition

While this option works for both single and multiple selected checkbox values. However, sometimes I got the following error.

Also, I have the following conditions

The initial value of the variable prevSolution is EMPTY and I have an action to set the value after a send web request action. 
However, it looks like the prevSolution variable has never been set because the following condition is always evaluated to true.

Does anyone have any idea how can I achieve the use case explained above?