'How to check type of feature layer loaded on openlayers?

I have used open layer in my project. In which I have added multiple featurelayers on the osm/base map.These layers are overlaping each other.when I click on feature, How to know which layer is clicked on map?



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source