# Copy dictionary and modify it without affecting the original

**URL:** <https://forum.inductiveautomation.com/t/copy-dictionary-and-modify-it-without-affecting-the-original/62297>\
**Category:** Ignition\
**Tags:** ignition81\
**Created:** [July 26, 2022, 9:12am UTC](https://forum.inductiveautomation.com/t/copy-dictionary-and-modify-it-without-affecting-the-original/62297 "2022-07-26T09:12:13Z")\
**Posts on this page:** 3\
**Page:** 2

<div class="post-metadata">

**Author:** ![victordcq](https://avatars.discourse-cdn.com/v4/letter/v/f6c823/32.png) [@victordcq](https://forum.inductiveautomation.com/u/victordcq)\
**Post date:** [July 28, 2022, 8:24am UTC](https://forum.inductiveautomation.com/t/copy-dictionary-and-modify-it-without-affecting-the-original/62297/21 "2022-07-28T08:24:38Z")

</div>

> [@ISEMAREN\_AAG](#):
>
> so I have created **my own function to do deep copy of a dictionary.** :
> 
> ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/6/a/6ab099e0388919e5f8eff7cbf2d756a550aaab7b.png)

the original function was run in the scripting console with a real dict, not with the properties

the types of "dicts and arrays" from properties are AbstractMutableJythonMap,AbstractMutableJythonSequence

---

<div class="post-metadata">

**Author:** ![pascal.fragnoud](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pascal.fragnoud/32/24728_2.png) [@pascal.fragnoud](https://forum.inductiveautomation.com/u/pascal.fragnoud)\
**Post date:** [July 28, 2022, 8:57am UTC](https://forum.inductiveautomation.com/t/copy-dictionary-and-modify-it-without-affecting-the-original/62297/22 "2022-07-28T08:57:08Z")

</div>

Ah ! I missed that !

---

<div class="post-metadata">

**Author:** ![lrose](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/lrose/32/62724_2.png) [@lrose](https://forum.inductiveautomation.com/u/lrose)\
**Post date:** [July 28, 2022, 11:14am UTC](https://forum.inductiveautomation.com/t/copy-dictionary-and-modify-it-without-affecting-the-original/62297/23 "2022-07-28T11:14:04Z")

</div>

Oops! Good catch. Original function corrected.

[Previous page](https://forum.inductiveautomation.com/t/copy-dictionary-and-modify-it-without-affecting-the-original/62297.md?page=1)
