title: How to convert between String and JsonNode use toString() method and JsonNode(String) constructor
body: <p>I just need some guidance in writing this so that I understand the concept:</p>
  
  <p>Basically I need to convert between a String and a JsonNode and I have seen an answer which states what to do, but as a novice developer, I am unsure what it means. If I can see it implemented then it will help.</p>
  
  <p>Below is my json node for a response:</p>
  
  <pre><code>    public void hitEndpoint(String endpoint) {
                  DataStore dataStore = DataStoreFactory.getScenarioDataStore();
                  HttpResponse&lt;JsonNode&gt; httpResponse;
                  String url = "xxx/xxx";
                  try {
                      httpResponse = Unirest.post(url)
                              .asJson();
                      dataStore.put("httpResponse", httpResponse);
          ...
  
  }
  </code></pre>
  
  <p>Below I am trying to cast the value so I can retrieve a value from the json:</p>
  
  <pre><code>public void RetrieveExampleNode(String endpoint){
      DataStore dataStore = DataStoreFactory.getScenarioDataStore();
      JsonNode httpResponse = (JsonNode) dataStore.get("httpResponse");
      String getExampleNode = httpResponse.getBody().getObject().getJSONArray("test").getJSONObject(0).get("example").toString();
     //issue above is that it doesn't recognise getBody. When I remove getBody() and run the code, it still gives me a class cast exception error in the line where states JsonNode httpResponse = ...
  }
  </code></pre>
  
  <p>JSON trying to parse and currently retrieved by httpResponse in the above code:</p>
  
  <pre><code>{"test": [{"example": "2019-09-18T04:32:12Z"}, {"type": "application/json","other": {"name": Test Tester}}]}
  </code></pre>
  
  <p>I'm using uniRest 1.4.9</p>