• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
  • Mikalai Zaikin

How to remove some part of code dynamically in JSON?

Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I am dynamically producing a JSON as shown below with a Map Data

Currently this is producing the following JSON

But i need to create the following JSON

Every comma seperated value inside the Map autoincrements the T level

Map<String, List<String>> consilatedMapMap = new LinkedHashMap<String, List<String>>();
List<String> values = new LinkedList<String>();

values.add("Bummy Chips,Masala Roasted with peanuts(49)");
values.add("Bummy Chips,Nimbu filled(50)");
consilatedMapMap.put("Chips & Chocolates", values);

This is my whole program

As it is in the same level i want to remove

My previous laptop never exploded like that. Read this tiny ad while I sweep up the shards.
a bit of art, as a gift, that will fit in a stocking
    Bookmark Topic Watch Topic
  • New Topic