DSPs- Using ifvar inside a loop for string list

In a B2B server DSP , can i use a %ifvar% within a %loop% to check if the value of an item in a string list equals something…?

The problem i face with this is that the ifvar needs a variable name to check against and the value of a string list item is denoted by %value%. So for example this does not work:
%invoke test:getList%
%loop strlist%
%ifvar %value% equals(‘yes’)%

%endif%
%endloop%
%endinvoke%

Any suggested workarounds?

%invoke test:getList%
%loop strlist%
%value%
%ifvar strlist equals(‘yes’)%

%endif%


%endloop%
%endinvoke%