title: How to Extract the Json Value from Json String using Java?
body: <p>This is my json structure and I want to get the values of hierarchy_name from each json object in an Array , can someone help me with that using Java..</p>
  <pre><code>  {
   &quot;hits&quot;: {
    &quot;total&quot;: {
     &quot;value&quot;: 218
    },
    &quot;max_score&quot;: null,
    &quot;hits&quot;: [
     {
      &quot;_index&quot;: &quot;planlytx&quot;,
      &quot;_source&quot;: {
       &quot;hierarchy_name&quot;: &quot;PRODUCT&quot;
      },
      &quot;fields&quot;: {
       &quot;attribute_name.keyword&quot;: [
        &quot;PRODUCT&quot;
       ]
      }
     },
     {
      &quot;_index&quot;: &quot;planlytx&quot;,
      &quot;_source&quot;: {
       &quot;hierarchy_name&quot;: &quot;PRODUCT&quot;
      },
      &quot;fields&quot;: {
       &quot;attribute_name.keyword&quot;: [
        &quot;PRODUCT-ALL&quot;
       ]
      }
     }
    ]
   }
  }
  </code></pre>