Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

How do I make an object within json_build_object()?

12 views
Skip to first unread message

Tom Tanner

unread,
Feb 1, 2018, 7:31:21 PM2/1/18
to
I have a Postgres query that starts like this.

SELECT json_build_object(
'type', 'Feature',
'properties', pop_density,
)

That returns something like `{"type":"Feature", "properties":10000}`. I want it to return `{"type":"Feature", "properties": {pop_density: 10000}}`.

How do I change my query to reflect that?
0 new messages