-
Notifications
You must be signed in to change notification settings - Fork 56
Open
Description
The goal for this enhancement is to provide the ability to 'flatten' properties from the input into primitive attributes. For example:
data = {
lat: 12.34,
lng: 56.78,
info: {
name: 'Johnny Goode',
age: 12
}
}
GeoJSON.parse(data, {Point: ['lat', 'lng'], include: ['name']});There is currently no way to get the 'name' property as an attribute of the resulting GeoJSON object.
In an attempt to avoid breaking existing logic, I think this may be a good solution:
function getPropFunction(params) {
...
else if (params.extract) {
func = function(properties) {
...
}
} else if (params.include) {
...
}Metadata
Metadata
Assignees
Labels
No labels