check for an exact match in array (data storage)
I'm making a custom inventory system, players are able to add items to a menu and retrieve them from said menu later. to do this, I am storing the item data in storage. I would like to ensure that the player does not store a duplicate of an item that is already in storage
the problem
/execute datadoes not check for exact matches, just partial matches. So, if an item{id: "minecraft:target"}has the less, but similar data to an item already in storage{id: "minecraft:target", components: {"minecraft:custom_name": "renamed"}}, then it will return that the new item already exists, even though the item is uniqueIs there a way to check for an exact match in an array? (I'm currently using macros to check the item data,
execute if data namespace:storage list[$(item_data)])