title: Convert JSON Object as a Flat Obejct with Key value pair
body: <p>I am getting a JSON object which looks like:</p>
  
  <pre><code>{
      "id": "1",
      "name": "Hw",
      "price": {
          "value": "10"
      },
      {
          "items": [{
              "id": "1"
          }]
      }
  }
  </code></pre>
  
  <p>I want to represent this as flat map, but I want to represent the array of items as a list.</p>
  
  <p>My output should look like:</p>
  
  <pre><code>{
  "id": "1",
  "name":"Hw",
  "price":"10",
  "items": ["1"]
  }
  </code></pre>
  
  <p>Can anybody suggest me how I can achieve this? I tried this approach:</p>
  
  <p><a href="https://stackoverflow.com/questions/20355261/how-to-deserialize-json-into-flat-map-like-structure">How to deserialize JSON into flat, Map-like structure?</a></p>
  
  <p>Output from the above tried link:</p>
  
  <pre><code>{
  "id": "1",
  "name":"Hw",
  "price.value":"10",
  "items[0].id": "1"
  }
  </code></pre>
  
  <p>But it is representing the arrays values as <code>array[0]</code>, <code>array[1]</code> which I don't need. I need this array as a list.</p>