title: Add new key value to json node in java
body: <p>I have JSON file :</p>
  
  <pre><code>{
     "id":1,
     "name":"abc",
     "addressDetails":
        {
          "City":"NewYork"
        }
  }
  </code></pre>
  
  <p>I wanted to add one more key-value ("pinCode" : "414141") to the node 'addressDetails'. </p>
  
  <p>I tried using :</p>
  
  <pre><code>ObjectMapper mapper = new ObjectMapper();
  JsonNode root = mapper.readTree(new File("D://test.json"));
  ObjectNode node = mapper.createObjectNode();
  node.with("addressDetails").put("pinCode", "414141"); 
  </code></pre>
  
  <p>But it's not getting added, Is there any way I can do this ?</p>