I have an array of tuples, where first element of tuple is string and second is int. Every tuple has array structure:
var array = [["ele1",1], ["ele2",1], ["ele3",1], ["ele4",1]];
How can I easily check if a string is element of a tuple in array of tuples in javascript?
if array.contains(tuple with first element "ele2")
Is it possible to do it without for loop (checking each element of array)?