i know that this comes a lot, but i've searched here and found no exact solution to what i'm looking for.
so, i have an array of objects that contains the following values:
device_names = [
{
address: 'XX:XX:XX:XX:XX:XX',
name: 'device name'
},
{
address: 'XX:XX:XX:XX:XX:XX',
name: 'device name'
}]
What i want is to check whether this array contains device with a specific address, and returns true if it is there.
please, don't suggest $.inArray
, because it always return -1 when used with array of objects.