I was trying to conditionally set a key using but am not getting it to work.
How would I go about doing something like

if value.selection is not null, 'who', {filter: value.selection, type: type})

Any hints would be very much appreciated!


You can use WHERE for a general filter or perhaps CASE

WITH CASE value.selection WHEN null THEN map ELSE, 'who', {filter: value.selection, type: type}) END as map

1 Like

Thanks a lot! This works well!