I would like to fill a JSON file, that is still empty with the below values using JQ.
I tried this code:
echo '{"Name": "FileName", "Size": "FileSize", "Action": "Action taken"}' | jq file.json
But it failed:
jq: error: clear/0 is not defined at , line 1: clear.json jq: 1 compile error
[
// Data should goes here
]
Expecting result:
[
{
"Name": "FileName",
"Size": "FileSize",
"Action": "Action taken",
},
// and so on
]
Thanks in advance