Access metafields of products and customer in Shopify Functions

Shopify Partner
9 1 4

Good day!

I want to loop through all the metafields of products in the cart and see if they match metafields in the customer. If any of them match I want to apply a discount. 
My app creats these custom metafields on the products and customers. They are just multi line strings.

Is it possible to loop through those metafields in the rust code of a shopify function like this?

If it is not possible how would I be able to achieve this in another way? Maybe using tags?

Replies 0 (0)