indexOf() only for values depending on input of another column
indexOf() only for values depending on input of another column
Capamania
Posts: 233Questions: 81Answers: 5
How can I do a https://datatables.net/reference/api/indexOf() for Column_02, but only for the rows with value '1' of Column_01?
Column_01 | Column_02
1|Value_03
1|Value_02
1|Value_01
3|Value_01
5|Value_01
var getData = table.column( 1 ).data().indexOf();
This question has an accepted answers - jump to answer
This discussion has been closed.
Answers
There are a few options, perhaps the most consise will be to use
cells().data()
with the row selector (row-selector
) as a function, selecting rows based on the data:Allan
Thanks for the hint Allan. It worked with the cells( rowSelector, columnSelector [, modifier ] ) method from https://datatables.net/reference/api/cells() .
Regards.