How can I get a simple array of the table's data that has .find()?
How can I get a simple array of the table's data that has .find()?
![Buffgeek](https://secure.gravatar.com/avatar/db28f1262113a7c140feb561d0a8287b/?default=https%3A%2F%2Fvanillicon.com%2Fdb28f1262113a7c140feb561d0a8287b_200.png&rating=g&size=120)
It seems that whatever object is produced by table.data(), it isn't an array that has a .find method. I had trouble navigating it in the console - even though it had the data referenceable by index [0] [1]... etc. it wasn't a standard javascript array because I couldn't use the .find function on it. This seems like it should be an important feature, to be able to simply export the table's data into a 1d array of objects so that I can use javascript's array methods against it.
In my specific case I'm feeding a pie chart with data from the table so that I don't have to ask my API for the data twice. And I'm using the .find() method when the user hovers over a pie slice to get the data row associated with that pie slice.
Answers
Oops I already solved this using toArray(). Now how do I delete my own question?![:expressionless: :expressionless:](https://datatables.net/forums/resources/emoji/expressionless.png)
I'd say that might be useful for others who might search for the same problem!![:) :)](https://datatables.net/forums/resources/emoji/smile.png)
C