Parse a transposed CSV with headers using PapaParse
<p>I'm working on a CSV uploader that uses <a href="http://papaparse.com/" rel="nofollow noreferrer">PapaParse</a> as it's CSV parser. For my CSV I would like my first column to act as my header for the parsed data as opposed to the first row. In order to get the expected outcome, I've been having to manually transpose the CSV in the editor before uploading.</p>

<p>The reason for this is that my users find it much easier to edit the CSV when the headers are in the first column and not the first row. Is there a way I can do this in PapaParse (or even JavaScript outside of PapaParse)?</p>

<pre><code>if (file != null) {
    Papa.parse(file, {
        header: true,
        complete: function (results, file) {
            console.log("Parsing complete: ", results, file);
        }
    });
}
</code></pre>