Here is how my collection looks:

[![](https://i.stack.imgur.com/0fxji.png)](https://i.stack.imgur.com/0fxji.png)

What I would like to is to get a first non-null value from it, something like `json-coalesce(my_collection,"$")` returing `5` in the first case and `true` in the second.

What's the best way to do this without handling each key individually?