I have a product object of a simple product which belongs to a configurable. I'm trying to get the attributes of the configurable which led to the simple I have. Since each simple of a configurable is the result of selecting options of that configurable, that should be possible.
I have the full simple product option and can easily get the Option value and Label of the attribute but only if I know the name of the attribute. Since the attribute is dynamic and can change I won't hardcode it.
There's a similar question for Magento 1 but that won't work for Magento 2.
How do I get the configurable options that led to the simple I have available?