I am able to assign the Hash-map values to List double[] using following code, but for each entry in the Hash-map, it is creating separate array.
ArrayList<HashMap<String, Double[]>> arl =(ArrayList<HashMap<String, Double[]>>)pd.getArrayList();
while (itr.hasNext()) {
HashMap< String,Double[]> map = (HashMap<String,Double[]>) itr.next();
empid.add((Double[])map.get("id"));
}
How do I get all the entries into single array of double[].
You’re making the same mistake again. You need to add Double to list, not arrays of Double. So similarly to what I said in your previous question, change your code like this:
To get array from the list after the list is fully built with values from your map: