# Cannot use .update() to change key value pairs in ObjectWrapper type

**URL:** <https://forum.inductiveautomation.com/t/cannot-use-update-to-change-key-value-pairs-in-objectwrapper-type/67063>\
**Category:** Ignition\
**Tags:** ignition81, scripting, perspective\
**Created:** [November 30, 2022, 12:04am UTC](https://forum.inductiveautomation.com/t/cannot-use-update-to-change-key-value-pairs-in-objectwrapper-type/67063 "2022-11-30T00:04:24Z")\
**Posts on this page:** 1\
**Showing post:** 3

<div class="post-metadata">

**Author:** ![ryan.white](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/ryan.white/32/73193_2.png) [@ryan.white](https://forum.inductiveautomation.com/u/ryan.white)\
**Post date:** [November 30, 2022, 12:58am UTC](https://forum.inductiveautomation.com/t/cannot-use-update-to-change-key-value-pairs-in-objectwrapper-type/67063/3 "2022-11-30T00:58:28Z")

</div>

I ended up using the sanitize tree function from [this](https://forum.inductiveautomation.com/t/function-to-convert-json-string-or-python-dict-into-objectwrapper/32861/15) post, which seems to allow me to modify the dictionary as I was intending to.

However, the tree's 'selectionData' property doesn't seem to update after the modified data has been applied to the tree. I have to click to a different item and then back to the modified item to see the changes. Is there a way to force the tree component to refresh that property?

In regards to boiling down the issue to send to support, what would I need to do? Make a view with a tree and a button that executes a simple script to change a dictionary in the first level of the tree data?

---

_[View the full topic](https://forum.inductiveautomation.com/t/cannot-use-update-to-change-key-value-pairs-in-objectwrapper-type/67063)._
