How to detect if something has custom data regardless of what the custom data equals

Soo lets say I have an item with the custom data "foo":"bar" and one with the custom data "foo":"baz", and I want to detect if the item has the "foo": custom data, regardless of what comes after it. Is there a way to do that in a predicate/advancement?
Continue to help post