Postgres Select Ids Into Array Methods Javascript Pop