我有这张Map的清单:
[
[a:1998-01-14, b:2028-11-05, c:OQSeMPIcHNP, d:ASD, e:DEF, f:UuzSJiVvxjhJipzxUPsSsbmaeMvOT, g:mef, e:P00003036, h:P],
[a:1998-08-22, b:2028-11-05, c:fDScShsqpKqreHPqpANUrnZklN, d:LAS, e:FGH, f:lKuMgRxxrVuwCEXMNiIERHOcUCNmbG, g:ela, e:P00006583, h:P],
[a:1992-02-29, b:2031-01-01, c:SOThmQNAbKexnvDaxOi, d:MAR, e:ZAD, f:tkYiSUxSoTZrceRoIOYYsZztvvnzkno, g:ela, e:P00002839, h:P]
]
我需要创建一个新的Map列表,或者更新现有的Map列表,方法是将所有键c和f的值都大写。
预期成果:
[
[a:1998-01-14, b:2028-11-05, c:OQSEMPICHNP, d:ASD, e:DEF, f:UUZSJIVVXJHJIPZXUPSSSBMAEMVOT, g:mef, e:P00003036, h:P],
[a:1998-08-22, b:2028-11-05, c:FDSCSHSQPKQREHPQPANURNZKLN, d:LAS, e:FGH, f:LKUMGRXXRVUWCEXMNIIERHOCUCNMBG, g:ela, e:P00006583, h:P],
[a:1992-02-29, b:2031-01-01, c:SOTHMQNABKEXNVDAXOI, d:MAR, e:ZAD, f:TKYISUXSOTZRCEROIOYYSZZTVVNZKNO, g:ela, e:P00002839, h:P]
]
如何使用groovy实现这一点?
1条答案
按热度按时间ryevplcw1#
请尝试以下操作: