Created by
Piotr Szrajber
| function geojson2csv(x) {
var header = Object.keys(x.features[0].properties);
return [header].concat(x.features.map(function(feature) {
return header.map(function(col) {
return feature.properties[col];
}).join(",");
})).join("\n");
}
|