Using Magento 2, You can fetch Parent product Ids as an array from the child id of the product.
To Retrieve the Parent product id, You need Child Item Id associated with Grouped Product. Using Magento\GroupedProduct\Model\Product\Type\Grouped Magento Core class you can fetch the parent product Id.
For More Knowledge check the article, You can fetch All the children’s items by Grouped Product SKU.
Used function getParentIdsByChild($childProductId)
Continue reading “How to get Grouped Product id from child product id in Magento 2?”