Postgres Loop Through Array Of Objects Example