Assuming I have a list structured as follows:
[
"id1", "01-01-2019", "name1", "€ 5,60",
"id2", "02-01-2019", "name2", "€ 5,70",
"id3", "03-01-2019", "name3", "€ 5,20",
...
]
and my goal is to transform it into a list of JSON objects like this:
[
{
"id": "id1",
"date": "01-01-2019",
"name": "name1",
"value": "€ 5,60"
},
{
"id": "id2",
"date": "02-01-2019",
"name": "name2",
"value": "€ 5,70"
},
{
"id": "id3",
"date": "03-01-2019",
"name": "name3",
"value": "€ 5,20"
},
...
]
What is the most efficient method to accomplish this task using JavaScript?