# Is it possible to pass variable from gateway scope to client scope?

**URL:** <https://forum.inductiveautomation.com/t/is-it-possible-to-pass-variable-from-gateway-scope-to-client-scope/45008>\
**Category:** Ignition\
**Tags:** ignition81, scripting\
**Created:** [March 29, 2021, 12:00pm UTC](https://forum.inductiveautomation.com/t/is-it-possible-to-pass-variable-from-gateway-scope-to-client-scope/45008 "2021-03-29T12:00:24Z")\
**Posts on this page:** 1\
**Showing post:** 23

<div class="post-metadata">

**Author:** ![justin.brzozoski](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/justin.brzozoski/32/13452_2.png) [@justin.brzozoski](https://forum.inductiveautomation.com/u/justin.brzozoski)\
**Post date:** [April 1, 2021, 7:33pm UTC](https://forum.inductiveautomation.com/t/is-it-possible-to-pass-variable-from-gateway-scope-to-client-scope/45008/23 "2021-04-01T19:33:50Z")

</div>

In my case, it was a bit more hard to spot, as some values that had come through Perspective properties at some point had been turned into `PropertyTreeScriptWrapper$ObjectWrapper` and `PropertyTreeScriptWrapper$ArrayWrapper` elements that were very good at imitating dicts and lists until they got into jsonEncode.

It’s got barely minutes of testing on it, but this snippet of code helped me spot my bad elements:

[EDIT: Removed this snippet as I put a more robust one over on [this post](http://forum.inductiveautomation.com/t/jsonencode-issue/44603/26).]

---

_[View the full topic](https://forum.inductiveautomation.com/t/is-it-possible-to-pass-variable-from-gateway-scope-to-client-scope/45008)._
