CSV Reader code in javascript