I have a csv file which only has one column consisting of 200 rows. I want to use each row count as "priority" and each row value as "name", obtaining the following json format:
[{ "model" : "mymodel",
"pk" : ROW_ID,
"fields":{
"name" : ROW_VALUE,
"priority" : ROW_ID
},
{ "model" : "mymodel",
"pk" : ROW_ID,
"fields":{
"name" : ROW_VALUE,
"priority" : ROW_ID
}]
I know that I have to use csv and json, but quite confused about the nested json format. Any help on this?
csvif it only has one column. Is it just a list of 200 values separated by line breaks?