How to filter product by stock quantity?

I am trying to get results of products by stock quantity filter i use this inside the constructor of my helper class. \Magento\Catalog\Model\ResourceModel\Product\CollectionFactory $product_lib The question is how do i add stock quantity from and to in this? $this->product_lib->create()->addAttributeToSelect(‘*’)-> addCategoriesFilter(array(‘in’ => array(1,2,3))-> addFieldToFilter(‘price’, [‘from’ => $min_price, ‘to’ => $max_price]) ->load(); When i try to additional […]