Remove items from Dictionary
Remove items from Dictionary
(OP)
Hi
I need to remove some entries from dict, based on pattern i.e.:
instead when hard coded: set keyValueMap [dict remove $keyValueMap WidgetTEXT WidgetPASSWORD] works.
What is my mistake?
best regards
I need to remove some entries from dict, based on pattern i.e.:
set keyValueMap [dict create "WidgetTEXT" "T" "WidgetPASSWORD" "P" "defValuesDEFAULTS" "DEFAULT" "defValuesRDB" "R"]
set keyValueMap [dict remove $keyValueMap [join [dict keys $keyValueMap "Widget*"]]]
Although [join [dict keys $keyValueMap "Widget*"] returns WidgetTEXT WidgetPASSWORD, this doesn't works; instead when hard coded: set keyValueMap [dict remove $keyValueMap WidgetTEXT WidgetPASSWORD] works.
What is my mistake?
best regards
RE: Remove items from Dictionary
CODE
It is like issuing
CODE
The string needs to be split into its individual components using {*}
CODE
RE: Remove items from Dictionary
best regards
RE: Remove items from Dictionary
CODE
RE: Remove items from Dictionary