You can use the .bindPopup() method to bind a desired attribute to the popup, with the use of an .onEachFeature() function. See below. Examples can be found here.
function onEachFeature(feature, layer) {
if (feature.properties && feature.properties.NAME) {
layer.bindPopup(feature.properties.NAME);
}
}
geojsonFeaturesfunction =addDataToMap(data, "county_coords.geojson"
map) {
L.geoJSONgeoJson(geojsonFeaturesdata, {
onEachFeature: onEachFeature
}).addTo(map);
}
$.getJSON("county_coords.geojson", function(data) {
addDataToMap(data, mymap);
});