var elements = ""; let properties = e.layer.feature.properties; for (var item in properties) { let name = item; let value = properties[name]; if (window.hideFields.indexOf(name) < 0 && value != null) { elements = elements + name + ":" + value + "<br>" } }