1

I need to delete some wrong data, inserted in a lot of processes, and I need to figure if this is possible with cURL and rest API, with a script in sh, batch or something like this:

curl -u admin:admin -i -H "Accept: application/json" -X GET "http://json_bpm.com/wle/v1/service/6112449?action=getData&fields=context"

First I just need the result map.

Output:

{"status":"200","data":{"result":"{\"context\":{\"name\":\"xxx\" (...)
"resultMap":{"context":{"name\":"xxx\" (...) }}}

Because I need to remove the userDelete array (see below) for thousands of processes, and set this again using curl. If you know how to remove arrays from JSON too, you're the man. :)

 {
    "context": {
        "name": "Change Process",
        "startUser": {
            "user": "0001"
        },
        "endUser": {
            "user": "0001"
        },
        "userDelete": {
            "user": "0002"
        },
        "origin": "GUI",
        "userAction": "Change Process"
    }
 }
Biffen
  • 6,249
  • 6
  • 28
  • 36
tiago
  • 39
  • 10
  • Possible duplicate of [Parsing json with sed and awk](http://stackoverflow.com/questions/1955505) – lefloh Jun 25 '14 at 11:36
  • well, is not the same thing, I just need to get the result without '\', and I couldn't perform this in unix because chars like ã, for example, I tried iconv to solve this, but the result... – tiago Jun 25 '14 at 13:09

0 Answers0