CSV File Added to Form - Parse and Map to Fields

CSV File Added to Form - Parse and Map to Fields

Hi, 

I apologize, I can't seem to find a clear explanation or help article on how to parse a CSV file.

On validate, I process this deluge script.

fileContent = Collection(input.File_upload.content);
result = fileContent.values();
info result;

What I want to do is create a record (in another form), and map certain fields to fields in the form.  I can get values, which is the whole file but no keys. If I use result = fileContent.keys(); I get "0"

As you can see from CSV, my first line is my map and the second is the data.

Thanks,
Chris

"Ticket Date","Ticket Number","Lease Number","Rejected","Reject Notes","Rejected Reason","Lease Name","Tank Number","Load Level Top","Load Level Bottom","Load Temp Top","Load Temp Bottom","BSW %","Observed Gravity","Observed Temp","Gross Barrels","" "02/11/2020 02:47:00 PM","4553963","9087","","","","NORTH PHILLIPSTOWN UNIT","21738","138.75","13.25","48.0","40.0","0.4","32.8","45.0","146.91","" "02/14/2020 11:32:00 AM","4562360","200223","true","2.% water on bottom .2% bs on top Treat and drain off ","HB","JOHNNY BROWN #1","29374","0.0","0.0","0.0","0.0","0.0","0.0","0.0","0.0",""