Table to array , array back to table

Table to array , array back to table

Hi all

I'm a jquery newbie, loving the power of it..wow.

I have made a table , and I would like to take the date to an array and into CSV format into a variable/array.
i would like to be able to take that data from the variable/arry and read it back into the table (append) imagine the table is blank to start.
Here's the fiddle:
I have gotten to a point and now I'm stuck at formatting the output:
  1. ,Eagle,Front,2018-09-25 12:00,1537876800,2018-09-26 12:00,1537963200,Normal,1234,12,,Hawk,Front2,2018-09-25 12:00,1537876800,2018-09-26 12:00,1537963200,Normal,1234,12,,Robin,Front1,2018-09-25 12:00,1537876800,2018-09-26 12:00,1537963200,MR,1234,12
The problems I have are :

1.The Select column value doesn't show  --how can i add a value to it and/or remove it ?

2.How can i add " (quotation marks) to the beginning and end of each row as well as \r\n

3. In the date field there is a comma which splits the date and time and the unix timestamp
  1. 2018-09-25 12:00,1537876800
How do I handle this when reading the array back into the table ?

4. Is there a more elegant and possible faster solution to to table to array and array to table like the .map function or similar ?

I hope some kind soul can help

Thank you

Den