Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public void sampleDemo {
- for (int i = 0 ; i < 30 ; i++) {
- makeJs (hashMapOutput) {
- }
- }
- }
- public static void makeJs(HashMap hashMapOutput) {
- String key = "" ;
- Gson obj = new Gson();
- ArrayList arr = new ArrayList();
- Employee emp = new Employee();
- Invoice inv = new Invoice();
- Iterator iterator = hashMapOutput.keyset().iterator();
- while (iterator.hasNext()) {
- key = (String)iterator.next();
- ArrayList arraylist = (ArrayList)hashMapOutput.get(key);
- emp = arraylist.get(0);
- inv = arrayList.get(1);
- }
- arr.add(emp);
- arr.add(inv);
- string value1 = obj.toJson(arr);
- }
Add Comment
Please, Sign In to add comment