I need your help to solve the following problem: I have a JSON file that looks like this:
{
\"key1\": \"value1\",
\"key2\": \"value2\",
\"key3\": \"val
Not the answer for everyone, but if you already happen to have NodeJs installed in your system, you can use it to easily manipulate JSON.
eg:
#!/usr/bin/env bash
jsonFile=$1;
node > out_${jsonFile} <
Heck, if you only need to do JSON manipulation and you have node (ie: You don't really need any other bash functionality) you could directly write a script using node as the interpreter:
#! /usr/bin/env node
var data = require('./'+ process.argv[2]);
/*manipulate*/
console.log(JSON.stringify(data));