Short answer:
Your key values are: <? T(String).join( ",", $filter.get('enginePower').![key] ) ?>
Broken down
$filter.get('enginePower')
This will return the enginePower as an array containing all your objects.
.![key]
This will return the "Key" field values as an array.
T(String).join( ",", XXX )
This will convert your array XXX into a comma delimited list.
So your final output will say:
Your key values are: 55,65,66,81
Just to add to this. You can only get a single key/value list. If you want to capture a value of a different attribute using a key lookup, then you need to loop.
So for example, start by setting a counter
to 0
. Then have your node check for $filter.enginePower.size() > $counter
.
Within that node, you set "multiple responses" on. Then for the first condition you set $filter.enginePower[$counter].selectable == true
. This will allow you to take action if that field is true.
After this you need to create a child node, and have the parent node jump to it. Within the child node response put <? $counter = $counter + 1 ?>
. Lastly have the child node jump back to the parent node.
This will loop through the array. Warning! You can only loop 50 times before the loop will end. This is to stop potential endless loops.
Realistically though, you can easily solve all this by formatting the data correctly at the application layer.