Don't import duplicates in nested objects

Trying to index a SQL database for a eCommerce. It is divided by store where each store has it's own products. I'm trying to create a schema with the following structure.

{
    name: "store1",
    products: [{name: "product1", price: "1"},...]

}

The problem I'm having is that I haven't found a way to avoid duplicate products when storing them as nested objects. Is this possible or is this approach just wrong.

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.