Postgresql Convert Array To String Javascript Program To Check