I have a 2d array in the format
emi_309 | present | weak | 6
emi_310 | present | strong | 9
emi_319 | present | medium | 8
emi_315 | present | weak | 5
I want to check if a value exists in the first column using a simple function
E.g, check if emi_77 exists in the first column
I came across $.inArray(value, array) but this function is for a 1d array only.
Is there something similar for 2d array
Yes, if you do a combination of
$.inArrayand$.map: