Postgres First Element Of Array Php To Json