I am having an issue with trying to see if a value matches within an array that contains one objects.
Here is what I am doing:
var found = $.inArray(opt.ifpo_width, selectedOptions) > -1;
Lets say opt.ifpo.width contains 650. selectedOptions contains an object with a value of 650 so I will want found to return 0 because it that means the value has been found.
Heres an example of console.log of selectedOptions:
[Object, Object]
0: Object
active: true
......
ifpo_width: "650" <-- value I am checking
ifpo_x: "153"
ifpo_y: "86"
shown: false
__proto__: Object
1: Object
active: true
ifpo_width: "650" <-- this other object should not be here because there is already a width of the same value.
ifpo_x: "140"
ifpo_y: "102"
.....
What are your suggestions and thoughts about how I can check this selectedOptions for the value being checked with opt.ifpo_width?