Postgresql Plpgsql Loop Through Json Javascript Example Page