find routing-mark=main does not work

Try this in terminal
:put [/ip route find routing-mark=main]
it doesn’t show anything
I’m wanting to add a script that checks for routes only in the main routing table. Not very easy to do this. Only way I have found is to use
:global testmark [/ip route get 2 routing-mark]
:put [/ip route find routing-mark=$testmark]

Anyone have a better solution?

It is not supposed to work. Look at route print output, there is no routing-mark=main set for routes in default routing table.

/ip route find where !routing-mark

will work