Anyone removed entries from a map, e.g. one built from a json string, using a pattern / condition on the key value?
I've read the JSON below into a map and can't seem to get the removeAll function to work like some online examples explain for Groovy. I want to remove all the "image" entries or all the "background" entries. Any tips?
{
"background01": "http://www.bom.gov.au/products/radar_transparencies/IDR043.background.png",
"background02": "http://www.bom.gov.au/products/radar_transparencies/IDR043.locations.png",
"image1": "http://www.bom.gov.au/radar/IDR043.T.202110292344.png",
"image2": "http://www.bom.gov.au/radar/IDR043.T.202110292349.png",
"image3": "http://www.bom.gov.au/radar/IDR043.T.202110292354.png",
"image4": "http://www.bom.gov.au/radar/IDR043.T.202110292359.png",
"image5": "http://www.bom.gov.au/radar/IDR043.T.202110300004.png",
"image6": "http://www.bom.gov.au/radar/IDR043.T.202110300009.png",
"image7": "http://www.bom.gov.au/radar/IDR043.T.202110300014.png"
}