Step 1: Download the "parsebuddy.js" file and include it via the script tag.
<script src="pathto/parsebuddy.js"></script>
Step 2: Call parseBuddy.csvToJson() function from your js code and pass in the csv data as a string.
csvToJson() takes two parameters:
1. inputData (required) - which is the csv data,
2. delimiter (optional) - the delimiter in your csv data. Default is , (comma)
Step 3: Store the returned JSON data in some variable and use it as you wish!
var inp = document.getElementById("inputTextArea").value;
//I'm fetching my data from a textarea, you can have any other source you want.
var output = parseBuddy.csvToJson(inp);