title: How to query from geojson object?
body: <p>In the below posted query I want to query the following information</p>
  <pre class="lang-sql prettyprint-override"><code>    ST_Transform(ST_SetSRID(ST_GeomFromGeoJSON(feature-&gt;&gt;'geometry'),4326),25832) AS LIDARDataPolygonsAsGeometry
  </code></pre>
  <p>The <code>featuresCollection</code> is a geojson object.</p>
  <p>How can I query from a geojson object?</p>
  <pre class="lang-sql prettyprint-override"><code>    query=&quot;&quot;&quot;   
              WITH data AS (
                  SELECT '{featuresCollection}'::json AS featuresCollection
              )
              SELECT 
                  LIDARDataPolygonsAsGeometry,
              FROM (
                  SELECT 
                      ST_Transform(ST_SetSRID(ST_GeomFromGeoJSON(feature-&gt;&gt;'geometry'),4326),25832) AS LIDARDataPolygonsAsGeometry
                  
              FROM (SELECT json_array_elements(featuresCollection-&gt;'features') AS feature 
                      FROM data) AS f) j
              GROUP BY LIDARDataPolygonsAsGeometry
          &quot;&quot;&quot;.format(table=config['PostgreDB']['table_name_test'], width=config['Grid']['cell_width'], height=config['Grid']['cell_height'],bufferRadius=config['Grid']['buffer_radius'],featuresCollection=featuresCollection)
  </code></pre>