I am reading two csv files containg a set of attributes
File 1 attributes = name, class, rollno,
File 2 attributes = rollno, city,town
I need to match the two files and for every matching rollno I have to append the File 2 attributes into File1 and create a csv file in the format
rollno, name, class, city, town
So far I have succeeded in reading the File1 and file2 values into a List of linked hashmaps of the type.
List<Map<Object, Object>> _students = new ArrayList<Map<Object, Object>>();
I am not able to figure out the steps to move forward.
How do I search through the list map of first file for the roll no contained in the second listmap and append it to the firstlistmap?
and then print it to a csv file in the order specified ( I am able to iterate and print all the values in the order they were inserted in the map)
I would approach this problem by reading the first file and store the values in a hashmap. and then append to that hashmap
The key would be the role number and the value would be a list of the the other values.