I receive polygons via the ESRI REST API with Leaflet. I want to iterate through all attributes of a feature in order to create a custom pop-up for it.
My code looks like this:
myLayer.on('click', function (evt)
{
feature = evt.layer.feature;
//Here I want to iterate ...
}
I know that I can access the attributes like this:
feature.properties.myAttribute
But how can I iterate through all attributes?