[Vuejs]-Check if string is in an array of objects VueJS?

0๐Ÿ‘

โœ…

if (this.myArray.some((el) => this.inputField.split(/[, ]/g).includes(el.uniqueID)) 

0๐Ÿ‘

You have an error in your condition. It should be

this.myArray.some((el) => el.uniqueId /* <-- "d" instead of "D" */ === this.inputField)

Leave a comment