I have converted this JSON to Hashmap
http://www.mocky.io/v2/5d0dc72d3400008c00ca4a62
I have nested Hashmap and I wanted to convert it to ArrayList
Map<String, Bank> stringBankMap = getValues();
I want to get all the data from stringBankMap and add to the list. I want also the key to the hashmap to also will be imported on the list as a guide.
Here is Bank class
public class Bank {
    private String guid;
    private String title;
    private long date;
    private String logo;
    private HashMap<String, HashMap<String, BankList>> list;
}
Here is BankList class
public class BankList {
    private double buy;
    private double sell;
    private String currency;
}
What I tried
 for(Map.Entry<String, Bank> entry1 : stringBankMap.entrySet()) {
                Bank newBank = new Bank(entry1.getKey());
                Bank bank = entry1.getValue();
                newBank.setDate(bank.getDate());
                newBank.setLogo(bank.getLogo());
                newBank.setTitle(bank.getTitle());
                List<BankList> bankListList = new ArrayList<>();
                for(Map.Entry<String, HashMap<String, BankList>> entry2 : bank.getList().entrySet()) {
                    HashMap<String, BankList> map = entry2.getValue();
                    for (Map.Entry<String, BankList> entry3 : map.entrySet()) {
                        BankList newBankList = new BankList(entry3.getKey());
                        BankList bankList = entry3.getValue();
                        newBankList.setBuy(bankList.getBuy());
                        newBankList.setSell(bankList.getSell());
                        bankListList.add(newBankList);
                    }
                }
                bankArrayList.add(newBank);
            }
But I don't understand why I am getting an exception
Please suggest me other algorithms if you can
 java.lang.ClassCastException: java.util.LinkedHashMap cannot be cast to core.model.Bank
 
    