# Dictionary issue

**URL:** <https://forum.uipath.com/t/dictionary-issue/454546>\
**Category:** Activities\
**Tags:** generic, system, activities\
**Created:** [July 7, 2022, 8:08am UTC](https://forum.uipath.com/t/dictionary-issue/454546 "2022-07-07T08:08:23Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![JSR\_Techno\_Talk\_s](https://sea2.discourse-cdn.com/uipath/user_avatar/forum.uipath.com/jsr_techno_talk_s/32/125544_2.png) [@JSR\_Techno\_Talk\_s](https://forum.uipath.com/u/JSR_Techno_Talk_s)\
**Post date:** [July 7, 2022, 8:08am UTC](https://forum.uipath.com/t/dictionary-issue/454546/1 "2022-07-07T08:08:23Z")

</div>

Hi team

I am working with collection ,  
I have a generic collection of type string string

I just check the key is contained in collection or not

I am able to retrieve the key, but is collection.keys.contain not working

 ![2](https://global.discourse-cdn.com/uipath/original/4X/1/8/c/18c76414c3e8a46f14013dcfec924b49c6f89bb4.jpeg)  
 ![1](https://global.discourse-cdn.com/uipath/original/4X/c/2/e/c2e2b4ff863e3d457984f9d59284f4f9b727f364.jpeg)

Please suggest what i m doing wrong here

---

<div class="post-metadata">

**Author:** ![AkshaySandhu](https://sea2.discourse-cdn.com/uipath/user_avatar/forum.uipath.com/akshaysandhu/32/77316_2.png) [@AkshaySandhu](https://forum.uipath.com/u/AkshaySandhu)\
**Post date:** [July 7, 2022, 8:20am UTC](https://forum.uipath.com/t/dictionary-issue/454546/2 "2022-07-07T08:20:29Z")

</div>

Hello @JSR_Techno_Talk_s  
It seems that the keys in dictionary starts and ends with double quotes.  
try checking key exit like below  
**`StaticFileCollectionResult.Keys.Contains("""appcode""")`**

---

<div class="post-metadata">

**Author:** ![AkshaySandhu](https://sea2.discourse-cdn.com/uipath/user_avatar/forum.uipath.com/akshaysandhu/32/77316_2.png) [@AkshaySandhu](https://forum.uipath.com/u/AkshaySandhu)\
**Post date:** [July 7, 2022, 8:23am UTC](https://forum.uipath.com/t/dictionary-issue/454546/3 "2022-07-07T08:23:33Z")

</div>

Also as per this screenshot of yours  
 ![image](https://global.discourse-cdn.com/uipath/original/4X/5/1/6/516ba7e7706c337e4f352123b8ff1e610aa43fcb.png)

you can see the back slash before appcode, it there to escape that double quote

---

<div class="post-metadata">

**Author:** ![JSR\_Techno\_Talk\_s](https://sea2.discourse-cdn.com/uipath/user_avatar/forum.uipath.com/jsr_techno_talk_s/32/125544_2.png) [@JSR\_Techno\_Talk\_s](https://forum.uipath.com/u/JSR_Techno_Talk_s)\
**Post date:** [July 7, 2022, 8:26am UTC](https://forum.uipath.com/t/dictionary-issue/454546/4 "2022-07-07T08:26:27Z")

</div>

You are right , Any idea How to over come from this

I am reading a text file and adding to dictionary

 ![3](https://global.discourse-cdn.com/uipath/original/4X/e/6/7/e67de60aaaf1c87d18dd43b06722512bb626b8b3.jpeg)

---

<div class="post-metadata">

**Author:** ![AkshaySandhu](https://sea2.discourse-cdn.com/uipath/user_avatar/forum.uipath.com/akshaysandhu/32/77316_2.png) [@AkshaySandhu](https://forum.uipath.com/u/AkshaySandhu)\
**Post date:** [July 7, 2022, 8:31am UTC](https://forum.uipath.com/t/dictionary-issue/454546/5 "2022-07-07T08:31:58Z")

</div>

it looks like JSON file to me.  
In more appropriate way to try to de-serialize it.  
and simpler way would to keep your logic as is and the remove the double quotes after reading the text file.

---

<div class="post-metadata">

**Author:** ![JSR\_Techno\_Talk\_s](https://sea2.discourse-cdn.com/uipath/user_avatar/forum.uipath.com/jsr_techno_talk_s/32/125544_2.png) [@JSR\_Techno\_Talk\_s](https://forum.uipath.com/u/JSR_Techno_Talk_s)\
**Post date:** [July 7, 2022, 8:42am UTC](https://forum.uipath.com/t/dictionary-issue/454546/6 "2022-07-07T08:42:52Z")

</div>

Thanks Buddy ,

For Quick answer and ur suggestion

---

<div class="post-metadata">

**Author:** ![system](https://sea2.discourse-cdn.com/uipath/user_avatar/forum.uipath.com/system/32/182466_2.png) [@system](https://forum.uipath.com/u/system)\
**Post date:** [July 10, 2022, 8:43am UTC](https://forum.uipath.com/t/dictionary-issue/454546/7 "2022-07-10T08:43:26Z")

</div>

Closed on July 10, 2022, 8:43am UTC

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