Seems my coding brain has gone on holiday...
I have a solution, but feel certain there is a better way to do this.
The requirement is to convert a standard csv to json format:
CSV
id,name,email
1,john,john@gmail.com
2,sue,sue@gmail.com
3,bob,bob@gmail.com
4,nick,nick@gmail.com
to
JSON
[
{
"id":"1",
"name":"john",
"email":"john@gmail.com"
},
{
"id":"2",
"name":"sue",
"email":"sue@gmail.com"
},
{
"id":"3",
"name":"bob",
"email":"bob@gmail.com"
},
{
"id":"4",
"name":"nick",
"email":"nick@gmail.com"
}
]
I have these blocks that do it:
and an aia project
csvToJson.aia (3.2 KB)