i have a Map like
Map <String, List<Object>> timeSerisData
which contains two lists one is headerList and another is dataList but internally dataList contains another Objects, means my dataList is list of Objects. So now i am getting that headerList and dataList like this:
@PostMapping("/doExportData")
@Timed
public void doExportData(@Valid @RequestBody Map <String, List<Object>>
timeSerisData){
List<Object> headerList = new ArrayList<>();
List<Object> dataList = new ArrayList<>();
for(Map.Entry<String, List<Object>> entry :
timeSerisData.entrySet()) {
if(entry.getKey() == "headerData") {
headerList = entry.getValue();
System.out.println("headerlist"+headerList);
}else {
if(entry.getKey() == "dataList") {
dataList = entry.getValue();
System.out.println("data list"+dataList);
}
}
}
}
In above code in dataList i am getting list which contains two objects like this:[{Ticker=GSU,Name=Revenu,Year=2015, dataList=[1,2,3,4,5,6]}, {Ticker=GSU, Name=Gross,Year=2018, dataList=[7,8,9,10,11,12]}]
Now i want to get the values of this dataList and want to set that in pojo class. So how to get those values.