Prevent duplicate records in data store

I have a situation where on button click it currently adds value.id to local storage. I want to prevent duplicate entries that share the same id.

I have tried using the disable function in app connect to disable the button if the id exists in the data store but the closest I can get is to only disable when the id is value[0].id. Any ideas?

Community Page
Last updated: