Input file (csv).
NAME,TYPE,ACCESS_TOKEN
dev765,datatype,Token765
dev879,datatype,Token879
Append file:
{
"file": "string",
"mapping": {
"columns": [
{
"type": "NAME"
},
{
"type": "TYPE"
},
{
"type": "ACCESS_TOKEN"
}
],
"delimiter": ",",
"header": true,
"update": true
}
}
The goal is to replace the "string" in the 'Append file' with the content of the 'Input file', with line-break. So the resultant 'Append file' file should look like this:
{
"file": "NAME,TYPE,ACCESS_TOKEN\n dev765,datatype,Token765\n dev879,datatype,Token879",
"mapping": {
"columns": [
{
"type": "NAME"
},
{
"type": "TYPE"
},
{
"type": "ACCESS_TOKEN"
}
],
"delimiter": ",",
"header": true,
"update": true
}
}
What I actually need is the first line of the 'Append.txt' file as:
{
"file": "_the_content_of_the_input_file_with_\n_break",
REST OF THE FILE AS IT IS
....
....
}
I can append the entire file at the beginning or at the end if its plain text. Or replace a word with another. But just don't know how to do with the above format and how to replace a word with an entire file.