Skip to main content
100%

Gist c4a8fcc25bf7f635562d8367e2a3a660

✓ Published0🌍 Public
TThomasG77
Last edited Apr 4, 2021
Created on Apr 4, 2021

Read nested element from GeoJSON and GDAL SQLite dialect

ogrinfo -dialect SQlite -sql "SELECT a_property, json_extract(some_object, '$.another_property') AS another_property, json_extract(some_object, '$.last_prop[1]') AS subarrayelement, geometry FROM demo" /tmp/demo.geojson

We use functions presented at https://www.sqlite.org/json1.html to manipulate JSON in SQLite