PostgreSQL two table join with sub-jsonb matching I have two tables in PostgreSQL, A & B, for simplicity with exactly the same structure: