How could I get the particular column data in a rows('.select') object?
How could I get the particular column data in a rows('.select') object?
Link to test case: https://datatables.net/examples/api/select_row.html
Debugger code (debug.datatables.net): none
Error messages shown: none
Description of problem: On the official page: https://datatables.net/examples/api/select_row.html
It says I can use .rows() to get the context object.
So I picked these following rows:
However, If I want to get all the names in an array, in this particular case, like:
["Angelica Ramos", "Brielle Williamson", "Bruno Nash"]
This question has an accepted answers - jump to answer
Answers
You can use
pluck()
to get that name field - see the examples at the end of that reference page,Colin
colin, thanks a lot. you are my hero!:)
oh, sorry , just one thing.
After calling pluck(), how can I retrieve the data as an array?
It seems the pluck() still returns a DT object.
Try
toArray()
. Checkout theDatatables Utility
section of the API docs for more fun APIsKevin