title: Get nested JSON value with chained key in Java
body: <p>I have a JSON object like the one below. Is it possible in Java to get a nested value from one get call using a chained key? For example: </p>
  
  <pre><code>String fname = jsonObj.get("shipmentlocation.personName.first")
  
  {
      "shipmentLocation": {
          "personName": {
              "first": “firstName”,
              "generationalSuffix": "string",
              "last": "string",
              "middle": "string",
              "preferredFirst": "string",
              "prefix": "string",
              "professionalSuffixes": [
                  "string"
              ]
          }
      },
      "trackingNumber": "string"
  }
  </code></pre>
  
  <p>This did not work for me using the JSONObject class so I'm curious is there is an alternative method to do this. Thanks!</p>