How to get product salable quantity by object manager in Magento 2

If you want to show the product salable quantity, then follow these steps:How to get product salable quantity by object manager in Magento 2

1. First of all open your phtml file there you want to show the salable quantity.

2. Then apply following code in your phtml file:
<?php
$objectManager = \Magento\Framework\App\ObjectManager::getInstance();
$stockavailable = $objectManager->get('\Magento\InventorySalesAdminUi\Model\GetSalableQuantityDataBySku');
$sku= $stockavailable->execute($_product->getSku());
echo ($sku[0]['qty']);
?>
3. Then run following command:
php bin/magento cache:flush
Now you can see your product’s salable quantity like this:
24
How to get product salable quantity by object manager in Magento 2expoundsofttechsolution What Is Beacon ?