Javascript Push Value Into Array If Not Exists In Postgresql