Postgresql Javascript Array Find Function