How i can convert a list to hashmap

How I can convert a list with some values to hashmap, where one value from list will be a key for hashmap, and value will be part of list.

For Example:

list = ({1; black; cat}, {2; black; dog}, {2; red; dog}, {2; yellow; dog}...);

i want to make a hashmap where a key would be a color and value will be a list element which have this color:

hashMap = {key: black, value: ({1; black; cat}, {2; black; dog}); ...}...

Read More »

By: StackOverFlow - Thursday, 8 November

Related Posts

  • Older News
  • convert hashmap to list StackOverFlow (3 days ago) - I have list of hashmap into one single object Object result = "[{sysName=LENEL REGIONAL 1, id=1}, {sysName=LENEL REGIONAL 1, id=2}";now i need to convert it into model class like :-...