Postgres Find Function In Javascript