a command gives the following output which is arranged in an object, how to convert it to json using jq?
{\n currentBlock: 4769045,\n highestBlock: 7063981,\n knownStates: 15306625,\n pulledStates: 15306625,\n startingBlock: 0\n}
N.B the output isn't json; it contains \n strings.
i used the following to convert it
echo "$output" | jq -R -s -c 'split("\n")'
but the output wasn't as i expect it
["{"," currentBlock: 4787477,"," highestBlock: 7063981,"," knownStates: 15306625,"," pulledStates: 15306625,"," startingBlock: 0","}",""]