Can not find a proper query to format jsonb output in postgres I have a jonb column in a table.
Table: Users
id| posts
--------
1 | [{'title': '', 'is_published': '', 'description': '', 'some': 'extra'}, ...]
2 | [{'title': '', 'is_published': '', 'description': '', 'some': 'extra'}, ...]
How do I select the posts column to have just certain fields? Something like:
id| posts
--------
1 | [{'title':'', 'description': ''}, ...]
2 | [{'title':'', 'description': ''}, ...]
Any ideas?
PS: The version of postgres is the latest 12, 13, 14 ...