how do I detect all levels of a custom data item?

"execute if items entity @s weapon.mainhand *[custom_data~{royal_owner:1b}]" how can I make it detect royal_owner:2b, 3b, etc.?
Continue to help post