Friday 28 April 2017

Convert Papaparse row to object

Does papaparse support return an array of object instances that are keyed by the header columns?

For example I have a CSV file like this:

sku, location, quantity
'sku1', 'Chicago', 3
'sku2', 'New Yoark, 4

I'd like the array returned by papaparse to look like this:

 [{sku: 'sku1', location: 'Chicago', quantity: 3}, ...]



via Ole

No comments:

Post a Comment