/command-line-tools-nodejs

Some Command Line Tools by NodeJS

Primary LanguageJavaScript

Command Line Tools by NodeJS

Unescape JSON

It's for converting all JSON strings in JSON to JSON Object or JSON Array.

etc.

{
  "json":  {
    "json-object": {
      "p1": "p1-data"
    },
    "json-array-string": "[ \"data1\", \"data2\" ]",
    "json-object-string": "{ \"param1\": \"1\", \"param2\": \"2\" }"
  } 
}

It can be converted to this:

{
    "json": {
        "json-object": {
            "p1": "p1-data"
        },
        "json-array-string": [
            "data1",
            "data2"
        ],
        "json-object-string": {
            "param1": "1",
            "param2": "2"
        }
    }
}

build

yarn run pkg-unescape-json

Run

yarn run unescape-json

Thanks