Removing Keys from Dictionaries

Hello,

I would like to remove a {key,value} pair from a dictionary without using any external packages like the Microsoft package that has these capabilities. I have the key I need to remove but am unsure on how I should actually remove the key and value from the dictionary.

@Sahil_J_Patel
Plss find the attached workflow
Removekeyvalue.xaml (5.0 KB)

2 Likes
1 Like

How does the activity know which key to delete?

You will be passing the key to this method…

or

Add UiPath.WebAPI.Activities and Use Remove from Dict

1 Like

I am getting the error " For Each: Collection was modified; enumeration operation may not execute.". I am not sure why am I getting this error because I am using 2 separate dictionaries. One to iterate over and one to actually delete the keys from. Is there a way to get around this?

Capture

What are the properties/settings of your For Each?

Nevermind I was able to figure it out.

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.