Please see problem defination as describe below. I have ArrayList which contain HashMap. In HashMap one or many key-value pairs exist. ArrayList contain following:
HashMap1 contains key: column1 value:0001 key: column2 value:1 key: column3 value:1
HashMap2 contains key: column1 value:0001 key: column2 value:1 key: column3 value:2
Both HashMap1 and HashMap2 are kept inside ArrayList.
Now I enter a String like (column1, column2) Then I need output like Create new ArrayList containing following data:
HashMap1 contains key: column1 value:0001 key: column2 value:1
When I enter String like (column1, column3) Create new ArrayList containing following data:
HashMap1 contains key: column1 value:0001 key: column3 value:1
HashMap2 contains key: column1 value:0001 key: column3 value:2
i.e. I want to get distinct values from ArrayList according to Input String. Please Help me Logically as How can I achieve the same.