title: Iterate over JSON and add the list array into the object/array
body: <p>I have these two <code>JSON</code> arrays:</p>
  
  <pre><code>{ 
    "Person": {
      "Info": [
        "name": "Becky",
        "age": 14
      ]
     },
    "Fruits": [
      {
        "name": "avocado",
        "organic": true
      },
      {
        "name": "mango",
        "organic": true
      }
    ],
    "Vegetables": [
      {
        "name": "brocoli",
        "organic": true
      },
      {
        "name": "lettuce",
        "organic": true
      }
    ]
  }
  </code></pre>
  
  <p>What I am trying to do is to use <code>Jackson</code> and <code>Gson</code> libraries to make everything look pretty. </p>
  
  <p>Something like this. This works fine with <code>Gson</code>. So the output I want is:</p>
  
  <pre><code>{ 
    "Person": {
      "Info": [
        "name":"Becky",
        "age": 14
      ]
    },
    "FruitsList": {
      "Fruits": [
        {
          "name": "avocado",
          "organic": true
        },
        {
          "name": "mango",
          "organic": true
        }
      ]
    },
    "VegetablesList": {
      "Vegetables": [
        {
          "name": "brocoli",
          "organic": true
        },
        {
          "name": "lettuce",
          "organic": true
        }
      ]
    }
  }
  </code></pre>
  
  <p>I have set my classes as:</p>
  
  <pre><code>class Person{
     private List&lt;Info&gt; InfoList;
     //Set and get were set
  }
  
  class Info{
     private String name;
     private int age;
     //Set and get were set
  }
  
  class Fruits{
     private String name;
     private boolean organic;
     //Set and get were set
     public String toString(){
              return "Fruits:{" +
              "name:'" + name+ '\'' +
              ", organic:" + organic+'\''+
              '}';
     }
   }
  
   class Vegetables{
     private String name;
     private boolean;
     //Set and get were set
     public String toString(){
              return "Fruits:[" +
              "name:'" + name+ '\'' +
              ", organic:" + organic+'\''+
              ']';
     }
   }
  
  class rootFinal{
      private List&lt;Fruits&gt; fruitList;
      private List&lt;Vegetables&gt; vegetablesList;
      private List&lt;Person&gt; personList;
      //Set and get were set
  }
  
  class mainJson{
     final InputStream fileData = ..("testPVF.json");
  
     ObjectMapper map = new Ob..();
     rootFinal root = map.readValue(fileData,rootFinal.class);
     // I can access each class with 
     System.out.printl(root.getHeaderList.get(0));
  }
  </code></pre>
  
  <p>This outputs...</p>
  
  <pre><code>[Fruit{name:'avocado', organic:true}, Fruit{name:'mango', organic:true}]
  </code></pre>
  
  <p>But this is not what I want. </p>
  
  <p>I am trying to do an iteration over the JSON file or somehow if there is a better way to check an array exists. Add additional object/array to it.</p>
  
  <p>If I find <code>Veg</code> or <code>Fruit</code> I want to somehow add <code>VegList</code> and <code>FruitList</code> as shown. It should ignore the <code>"Person": {}</code> since it's in a <code>{}</code> symbol.</p>
  
  <p>Is there a way to do this with <code>Gson</code>? </p>