title: Json nested Objects check if null
body: <p>consider the following json</p>
  
  <pre><code>{  
     "sub1":{  
       "name":"Name-sub1",
       "sub11":{
         "name":"Name-sub11",
         "sub111":{
           "name":"Name-sub111",
           ...
         },
         ..
       },
       ...
     },
     ...
  }
  </code></pre>
  
  <p>I now want to fetch the inner name Element (Name-sub111) in java (it's a io.vertx.core.json.JsonObject)</p>
  
  <pre><code>object.getJsonObject("sub1").getJsonObject("sub11").getJsonObject("sub111").getString("name")
  </code></pre>
  
  <p>But I'm not sure if sub1 or sub11 or sub111 even exist - so I always need to check for null</p>
  
  <pre><code>if(object.getJsonObject("sub1") != null &amp;&amp; object.getJsonObject("sub1").getJsonObject("sub11") != null &amp;&amp; object.getJsonObject("sub1").getJsonObject("sub11").getJsonObject("sub111") != null) {
      return object.getJsonObject("sub1").getJsonObject("sub11").getJsonObject("sub111").getString("name");
  }
  </code></pre>
  
  <p>Does someone know a better solutions for this case?</p>