title: Java - Remove Fields from a JSON String recursively without POJOs
body: <p>How do I remove some fields with a specified name from a JSON string recursively ?</p>
  
  <p>For example, I want to remove the field "secondName" from the following JSON:</p>
  
  <p>INPUT:</p>
  
  <pre><code>{
      "name" : "abc",
      "secondName": "qwe",
      "add" : "abcd",
      "moreDetails" : {
          "secondName": "qwe",
          "age" : "099"
      }
  }
  </code></pre>
  
  <p>OUTPUT:</p>
  
  <pre><code>{
      "name" : "abc",
      "add" : "abcd",
      "moreDetails" : {
          "age" : "099"
      }
  }
  </code></pre>
  
  <p>I have to remove some fields from a lot of different JSONs with different structures/schema, so I won't be able to deserialize/serialize to/from a POJO.</p>