MultiValueMap ? Looking to make a multi value map - need help

Looking to have one key with multiple values...

Lets say I have this
[Bathroom Temp Eco Sensor;Humidity:[date:Fri Jul 15 11:28:13 EDT 2022,value:54]]

I want to be able to pull data from a device (easy) and then append it to this same key.

So end up with something like this
[Bathroom Temp Eco Sensor;Humidity:[date:Fri Jul 15 11:28:13 EDT 2022,value:54],[date:Fri Jul 15 12:28:13 EDT 2022,value:64]]

I know using put will just overwrite the first set of data.

Any idea how to do this??

Thanks!

one key, multiple values is a Map with a List as the value:

attr: ["switch", "motion", "sound", "rssi", "battery"]

and then just add to the list (<<)

Something like this might work also:

    testMap = [tKey:[date:"Fri Jul 15 11:28:13 EDT 2022",value:54]]
    newMapVal = [date:"Fri Jul 15 12:28:13 EDT 2022",value:64]
    testMap.tKey = [testMap.tKey,newMapVal]
    

Thanks for the replies! My wife dragged me off to the mall. Will give it a try when I get home.