I am having free text available into the file. I am stucked while convert it into the json string array
The columns names are variable and can be n number of columns
email_from,email_to,DATE_CHANGED
samwilliams@gmail.com, mike_haley@gmail.com, 1447666867
smithpaul@gmail.com, angierussell@gmail.com, 1447668867
The first line is of headers, and the rest of all the lines are their values. So, every line would contain, same number of parameters with respect to each column. Columns are comma separated.
The json string response should be looked like this
{
"data": [
{
"email_from": "samwilliams@gmail.com",
"email_to": "mike_haley@gmail.com",
"DATE_CHANGED": "1447666867"
},
{
"email_from": "smithpaul@gmail.com",
"email_to": "angierussell@gmail.com",
"DATE_CHANGED": "1447668867"
}
]
}