I'm having trouble loading an array that contains a subarray into DataTables correctly. It's structured like this:
I have two semi-working Plunkers that demonstrate what I've tried already.
1) The problem with this first Plunker is that the entire subarray (which contains all of the the x and y values) appears in concatenated form within a single cell of the row in the DataTable that corresponds to the parent row of the main data array.
2) In this second Plunker, also unsuccessful, the problem is that the same x and y values appear for every row.
I've set a bounty for a solution to this problem on Stack Overflow.
What I'm trying to do is get all of the values contained in dataset
— specifically, state
, record
, x
, and y
— to display correctly in the DataTable. Can anyone demonstrate a solution that would fix one of these Plunkers?