Postgres First Element Of Json Array Length Javascript