Getting Row ID from Search
Getting Row ID from Search

I am trying to get the row.data by doing a search against a specific column. This will supply what I need however I don't know the row.
var test = table.row(0).data()
I have tried to search against the row to get the index but all I get back is 0, not found essentially. I thought this would do it but no luck.
var test = table.column(0).search('string')
What is the easy method to search a string and either return the matched row index or ideally the data from that row?
This question has an accepted answers - jump to answer
Answers
I think what you are looking for is the
row-selector
as a function for therow()
API. There is an example in therow-selector
docs.Using
search()
is meant to search the table and update the table display showing the filtered results.Kevin
That worked perfect for me thanks. Wasted an hour looking before I posted lol.