$objectManager = \Magento\Framework\App\ObjectManager::getInstance();
$product = $objectManager->get('Magento\Catalog\Model\Product')->load('YOUR PRODUCT ID');
echo $product->getAttributeText('your_attribut');
I need to get product in carts with custom attribute values to pass in a XML for a API POST call I am making.
Say I dont have the product ID, and I just want to get the product in cart with custom attribute value, how would I do that?