Skip to content

How to get product collection unmatch product ids with custom collection ids in magento 2?

I want to get the unmatched product ids of catalog products with a custom module collection product ids.

For Example :

  1. The catalog product entity table has 12,14,15,16 product ids

  2. The custom table has 12,14 product ids.

Result: 15,16 -> Unmatched Product Ids.

How we can achieve this using Magento standard approach?