I am trying to inject all the values of a given path in the configuration as an array. I know I can inject Magento\Framework\App\Config\ScopeConfigInterface and get it from there using ScopeConfigInterface::getValue('my_path') but the problem is I am using a third party library that uses some config values and it expects an array to be injected.
I have worked it around by creating a new class that extends such a library and then call the parent constructor with the objects injected and also passing along an array I extract using ScopeConfigInterface::getValue('my_path'). However I would like to inject them directly to avoid unnecessary redundancy code. Any Ideas?
This can be summarized to how can I inject the value returned by a method in the di.xml.