Switch List or Size of List in Connector

Hi, I’m trying to determine whether there are any errors in a list in the connector (V33.5). I have decorated a JSON file as

'data': {
	'refundCreate': {
		'userErrors': list {
			'message': text

and would like to know whether there are any error messages and if so which. There is no other way to determine this, unfortunately.

I’ve tried to switch on the list as you would in the application language, but without luck. I’ve also tried .size, but that does not seem to work either. What options do I have to know the size of the list?

The .size is correct in this case, but you need to turn it into a comparison.
Since an empty list has a size of 0, you can compare the size to this.

'data'.'refundCreate'.'userErrors'.size => greater-than ( 0 )

The result of this is a boolean, which you can use in a match statement.

A simple walk provides access to the messages themselves.