Skip to content
Advertisement

how to iterate through geojson elements

i want to execute the code in this question https://gis.stackexchange.com/questions/142391/storing-geojson-featurecollection-to-postgresql-with-postgis/142479#142479 but when i run the app i receive the following error:

please let me know how to fix it.

code:

attempts:

Advertisement

Answer

From the database perspective the query works just fine, but the issue seems to be in the query building. Your query has a JSON document containing multiple " double quotes, so either you escape them (") or try to add the JSON to the query using parameters as described in this other answer.

Unrelated: You do not need these 3 nested subqueries. A single query would do:

User contributions licensed under: CC BY-SA
4 People found this is helpful
Advertisement