Js Check If Object Exists In Array In Sql