Skip to content
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

list nested objects but not need a nested list #772

Open
mauromago opened this issue Mar 7, 2024 · 1 comment
Open

list nested objects but not need a nested list #772

mauromago opened this issue Mar 7, 2024 · 1 comment

Comments

@mauromago
Copy link

Hi

I need to make a list from a geojson data I use in open layer. Data can't be changed.
I tried in many way to do it using list.js, that looks me be perfect for my need. However I can not be able to do it.

My data is something like that:

var json_2 = [ {"properties": { "zona": "Italia", "nome": "A"} }, {"properties": { "zona": "Italia", "nome": "I" } } ]

I should like to have a list with:

Italia - A
Italia - I

Is it possible in some way without parse the data?

@valerio-bozzolan
Copy link

Thanks for this issue. I'm not the library maintainer but I don't think that the library will ever support a native format for custom JavaScript objects like zona: <something> or nome: <something> really.

Adapting data is not generally bad, expecially in these situations. I mean: you can keep the original data exactly as-is, while it's possible to just adapt the data on-the-fly into a new desired data structure, and put that as input of the library.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants