title: Create JSON Object from various JSON Path
body: <p>We have a requirement to create JSON object from the various JSONPaths that are provided. For example below are two paths and the values of that path that are there in the new JSON object to be created.</p>
  <pre><code>$.student.firstName = &quot;Abc&quot;
  $.student.subject['physics'].mark=100
  </code></pre>
  <p>Is there any java open source library which helps to create the result object just from this path?</p>
  <pre><code>{
   &quot;student&quot;:{
   &quot;firstName&quot;:&quot;Abc&quot;,
   &quot;physics&quot;:{
     &quot;mark&quot;:100
    }
   }
  }
  </code></pre>
  <p>We explored certain libraries like <a href="https://github.com/json-path/JsonPath" rel="nofollow noreferrer">JSONPath</a>. It has option to parse the JSON file, but doesn't have option to recursively create the JSON file from the path.</p>