-
Notifications
You must be signed in to change notification settings - Fork 56
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add support for nested attribute properties #55
Comments
Thanks for opening this. Specifying |
Hey Casey, Yes, the intent is to elevate it on the output. I think the risk of duplicate key names should be resolved a different way. Although we could use the full path name as the new property name, that would make the resulting properties object very challenging to use. To resolve that issue, we could either say 'tough luck, you need to make sure your property names are unique', we could change the inputOptions1 = {
Point: [ 'lat', 'lng' ],
extract: [ 'info.name', 'info.age' ]
};
inputOptions2 = {
Point: [ 'lat', 'lng' ],
mapProperties: {
'info.name': 'name',
'info.age': 'age'
}
}; |
That makes sense. The |
so...how to get nested attribute properties to the
Thank you! |
@longbuibao Hi there! This functionality has not been implemented yet. I found a different solution to this problem in my code and did not circle back to this enhancement. If you want to try and implement this, I'm sure @caseycesari would welcome a PR! |
I will try sir! :') I'm new to programming so I think I dont have enough experience to read code :') btw my solution is pull out the property..thank you for great npm module! |
The goal for this enhancement is to provide the ability to 'flatten' properties from the input into primitive attributes. For example:
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:
The text was updated successfully, but these errors were encountered: