title: JsonNode Convert JSON to list of string
body: <p>I have a json in this format:</p>
  
  <pre><code>{
      "success": 1,
      "value": "[\"1-1\",\"1-2\",\"1-3\"]"
  }
  </code></pre>
  
  <p>The <strong>success</strong> is actually in <code>int</code> and value is a <code>List</code> of <code>String</code>, i want to get the <strong>value</strong> and put those elements into a <code>List&lt;String&gt;</code>. The List of String will be:</p>
  
  <pre><code>1-1
  1-2
  1-3
  </code></pre>
  
  <p>I actually wish to parse the entire json using JsonNode, but the problems that restrict me from doing so are:</p>
  
  <ol>
  <li><code>"[\"1-1\",\"1-2\",\"1-3\"]"</code> is wrapped with double quotes, so it
  might be treated as String.</li>
  <li>Have to get rid of the backslash in the string</li>
  </ol>
  
  <p>The following is my workaround that i tried, is there any elegant/better (It is better without regex, just parse entire json into JsonNode) way to do so?</p>
  
  <pre><code> ObjectMapper mapper= new ObjectMapper();
   JsonNode response = mapper.readTree(payload);  //payload is the json string
   JsonNode success = response.get("success");
   JsonNode value = response.get("value");
  
      if (success.asBoolean()) {
          String value = value .toString();
                 value = value .replaceAll("\"", "").replaceAll("\\[", "").replaceAll("\\]", "")
                      .replace("\\", "");
         return Arrays.asList(value .split(","));
      }
  </code></pre>