How can I fliter out based on a text value

I have the following code and I wonder why it does not let me filter based on text value, what should be the syntax here? I could not find it in the docs

'id': text -> ^ ^ ^ .'UWV Database upload'.'Raw Data'[] as $
					where 'city' -> $ .'city' = 'Amsterdam'

Filtering valid references based on text values is not supported.
Instead, I suggest that you make 'city' a reference, and use that to filter.
For example:

'Cities': collection ['City'] { .. }
'Raw Data': collection ['id'] {
	'id': text
	'City': text -> ^ .'Cities'[]
}
'Default city': text -> .'Cities'[] // set this to "Amsterdam" in your app

...
'id': text -> ^ ^ ^ .'UWV Database upload'.'Raw Data'[] as $
	where 'city' -> $ >'City' is ( >'Default city' )
1 Like