Six Stars

Look through HashMap

My scenario is: I have two hashMap A and B:


Map A is <String, Set<String>> which in my case is <Name, Set<Attributes>>

Map B is <String, <Long,Long>> which in my case is <Name, <id, amount>>


Now, what I want to achieve is that get id value and amount value for each Attributes who have same name in Map B..I use tJavaFlex component, but it doesn't work at all...


Example: Map A: {Lee=[Hair, Eye, Arm, Leg]}    

                Map B: {John={1,5}, James={2,7}, Lee={3,8}}

Result: {Hair={3,8}, Eye={3,8}, Arm={3,8}, Leg={3,8}}..


Anyone has any ideas? Thanks a lot in advance!!!!


  • Data Integration
Tags (2)
Six Stars

Re: Look through HashMap

Desired output is three columns which could be used in SQL DB, the 1st column is Attributes, 2nd is id, 3rd is amount... Thanks for help!!!