I have data that looks like this

```
{
    "status": "success",
    "data": {
        "data1": {
            "serialNumber": "abc123",
            "version": "1.6"
        },
        "data2": {
            "irrelvent": [
                "irrelvent",
                "irrelvent"
            ]
        },
        "data3": {
            "irrelevantLibs": {
                "irrelevantFiles": [
                    "irrelevant.jar",
                    "irrelevant.jar",
                    "irrelevant.jar"
                ]
            }
        },
        "data4": {
            "configuration": "auth"
        }
    }
}

```

I am using the Jackson JSON Processor. What I need to do under the `data` object is to extract each `data(x)` into it's own data.

Hard to explain but I will try to be detailed. My intent is to make the JSON data more readable for our customers. So I'm trying to make the JSON data more friendly by splitting each `data(x)` object into blocks/tables on a website. So `data1` will be displayed independently. Then `data2` will be displayed independently and so on. So in this case I have four `data(x)` objects and I want to store those four objects into four different `Strings` and display them however I want. My problem is how do I get the Jackson Processor to do this?

Not sure if this is helpful but my current JSON function to process the JSON data is this:

```
public static String stringify(Object o) {
    try {
        ObjectMapper mapper = new ObjectMapper();
        DefaultPrettyPrinter printer = new DefaultPrettyPrinter();
        printer.indentArraysWith(new Lf2SpacesIndenter());
        return mapper.writer(printer).writeValueAsString(o);
    } catch (Exception e) {
        return null;
    }
}

```

I'm positive that I can manipulate the processor to get those data separated but I don't know where to start.

EDIT: Hmm, since Jackson seems to be a pretty difficult parser to work with, would it be easier if I used the Javascript JSON parser to extract only the `data` objects? Since I already have Jackson convert the JSON data into a String, using Javascript would work?
['https://Stackoverflow.com/questions/17536926', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/1227566/']
The code below shows the substring extraction using regex in groovy: 

```
class StringHelper {
@NonCPS
static String stripSshPrefix(String gitUrl){
    def match = (gitUrl =~ /ssh:\/\/(.+)/)
    if (match.find()) {
        return match.group(1)
    }
    return gitUrl
  }
static void main(String... args) {
    def gitUrl = "ssh://git@github.com:jiahut/boot.git"
    def gitUrl2 = "git@github.com:jiahut/boot.git"
    println(stripSshPrefix(gitUrl))
    println(stripSshPrefix(gitUrl2))
  }
}

```
One more sinle-line solution additional to tim\_yates's one

```
def result = articleContent.replaceAll(/<!\[CDATA\[(.+)]]>/,/$1/)

```

Please, take into account that in case of regexp doesn't match then result will be equal to the source. Unlikely in case of

```
def result = (articleContent =~ /<!\[CDATA\[(.+)]]>/)[0]​[1]

```

it will raise an exception.