Swift Dictionary with Array of Strings remove Value -


so, have dictionary contains array of strings this:

var dict = ["section1": ["dev1", "dev2"], "section2": ["dev3", "dev4"]] 

and have able remove value array. example: want remove "dev4" no matter if in "section1" or "section2".

how doing this?

for key in dict.keys {     dict[key] = dict[key]!.filter({ $0 != "dev4"}) } 

Comments

Popular posts from this blog

Sort a complex associative array in PHP -

vb.net - How to ignore if a cell is empty nothing -

recursion - Can every recursive algorithm be improved with dynamic programming? -