I don't like saving raw JSON into a database. I prefer structured data. But sometimes it's unavoidable, e.g. for cases when requirements change on a daily or hourly basis.
PostgreSQL makes this very easy with the jsonb data type.
Let's say I want to figure out how many people agreed to the 'preteen childcare waiver`.
Common Table Expressions (CTEs) make this pretty intuitive.
1/3