A while back, I wrote [a script to do daily dumps of a PostgreSQL table with a JSONB column][old one]. This was something an intern did daily for a client.
However, as summer came, we needed to automate this. The simplest and quickest solution turned out to do this using Heroku Dataclips.
I wasn’t aware of the [JSON functions and operators][json ops] of PostgreSQL, allowing you to both
SELECT stuff from inside the JSON, and use in
WHERE predicates. (It appears that you can even
set up indexes on JSON values.)