javascript check if property value exists in array of objects