Can any one help me in converting csv to json file. I am trying to write the code using Node js.
I have input file with two columns as:
Name ,abc de
Role ,role1;
,role2
Address ,7, xyz
,suburb
,city, state
,country
///
Name ,abc1 de1
Role ,role3;
,role4
Address ,8, xyz1
,suburb1
,city1, state1
,country1
///
I want the output as json:
[
{Name:{first_name:abc, last_name:de},
Role:[role1,role2],
Address:[7, xyz, suburb, city, state, country]},
{Name:{first_name:abc1, last_name:de1},
Role:[role3,role4],
Address:[8, xyz1, suburb1, city1, state1, country1]}
]
Many thanks in advance.