Map list block error

I used Map list block to join 2 var and I got this error:
[Executing block Map Lists] ArgumentException: An item with the same key has already been added. Key: 5

BOT ENDED AFTER 6019 ms WITH STATUS: ERROR
How can I fix it.

thank you

You cannot have a dictionary with 2 values that have the same key, you need to remove it first.

I need keep the same key and map list them. Can I Do it?
I need keep all of them because It’s important.

Then the map block is not the one you want, please use the Zip block instead

1 Like

How can I compute this parse:
I wanna compute: 10+20+5+ =REsults
Screen Shot 2021-08-06 at 2.01.11 PM

Join the list via Join block and use + as separator, then pass it to the compute block.
Otherwise you can use this code (replace myList with your variable)

int sum = myList.Sum(v => int.Parse(v));
1 Like

How Can I Do This In OB2:
PARSE1:
1
2
3
PARSE2:
4
5
6
I wanna Join to 1+2+3+4+5+6
Thankyou

You have to concatenate the 2 lists first and then use the join block on the concatenated variable.

what block I need to use to concatenate the 2 lists? Thank you

1 Like