# Convert Param Object to PyDictionary

**URL:** <https://forum.inductiveautomation.com/t/convert-param-object-to-pydictionary/67590>\
**Category:** Ignition\
**Tags:** scripting, perspective\
**Created:** [December 14, 2022, 3:46am UTC](https://forum.inductiveautomation.com/t/convert-param-object-to-pydictionary/67590 "2022-12-14T03:46:06Z")\
**Posts on this page:** 1\
**Showing post:** 3

<div class="post-metadata">

**Author:** ![paul-griffith](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/paul-griffith/32/37249_2.png) [@paul-griffith](https://forum.inductiveautomation.com/u/paul-griffith)\
**Post date:** [December 14, 2022, 5:51pm UTC](https://forum.inductiveautomation.com/t/convert-param-object-to-pydictionary/67590/3 "2022-12-14T17:51:09Z")

</div>

`dict(self.view.params.PopupParams)` might work; if it's not a deep dictionary.

If you do need a deep copy, you could try the approaches mentioned here:

> [@Copy dictionary and modify it without affecting the original](https://forum.inductiveautomation.com/t/copy-dictionary-and-modify-it-without-affecting-the-original/62297/9):
>
> As @bkarabinchak.psi pointed out even though the structure “looks” like a dict it isn’t actually a dict. Actually the type of a perspective property when accessed from a script is:[com.inductiveautomation.perspective.gateway.script.PropertyTreeScriptWrapper.ObjectWrapper](https://files.inductiveautomation.com/sdk/javadoc/ignition81/8.1.1/com/inductiveautomation/perspective/gateway/script/PropertyTreeScriptWrapper.ObjectWrapper.html). Thus deepcopy chokes when it runs into an object that it doesn’t know how to handle. If you need a true deepcopy, then you have couple of options. Write a function which recursively loops through the structure and correctl…

Or you could use [Ignition Extensions'](https://forum.inductiveautomation.com/t/ignition-extensions-convenience-utilities-for-advanced-users/64615) `system.util.deepCopy`.

---

_[View the full topic](https://forum.inductiveautomation.com/t/convert-param-object-to-pydictionary/67590)._
