I have the following query on a PostGIS Database
SELECT row_to_json(fc) FROM ( SELECT 'FeatureCollection' As type, array_to_json(array_agg(f)) As features FROM ( SELECT 'Feature' As type, ST_AsGeoJSON(lg.geom)::json As geometry, row_to_json((id, name)) As properties FROM lines As lg) As f ) As fc; which returns a GEOJSON Object of all features in the database.
How do i filter the results by a Bounding Box already in the query?