# \[Bug\] system.util.sendMessage fails with remoteServers when payload is not a dict

**URL:** <https://forum.inductiveautomation.com/t/bug-system-util-sendmessage-fails-with-remoteservers-when-payload-is-not-a-dict/55040>\
**Category:** Ignition\
**Tags:** ignition81\
**Created:** [January 14, 2022, 6:57pm UTC](https://forum.inductiveautomation.com/t/bug-system-util-sendmessage-fails-with-remoteservers-when-payload-is-not-a-dict/55040 "2022-01-14T18:57:23Z")\
**Posts on this page:** 1\
**Showing post:** 8

<div class="post-metadata">

**Author:** ![Trent.Boudreaux](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/trent.boudreaux/32/4138_2.png) [@Trent.Boudreaux](https://forum.inductiveautomation.com/u/Trent.Boudreaux)\
**Post date:** [October 7, 2022, 7:51pm UTC](https://forum.inductiveautomation.com/t/bug-system-util-sendmessage-fails-with-remoteservers-when-payload-is-not-a-dict/55040/8 "2022-10-07T19:51:19Z")

</div>

Thanks for sharing!

I landed on something similar

```auto
def unwrap(object): 
	if str(object).startswith('<ArrayWrapper>'):
		object = list(object)
		object = [unwrap(item) for item in object]
	elif str(object).startswith('<ObjectWrapper>'):
		object = dict(object)
		object = {key: unwrap(value) for key, value in object.items()}
	return object

```

Would prefer to explicitly check for ArrayWrapper and ObjectWrapper types, but not having any luck.  
\<type 'com.inductiveautomation.perspective.gateway.script.PropertyTreeScriptWrapper$ArrayWrapper'\>  
\<type 'com.inductiveautomation.perspective.gateway.script.PropertyTreeScriptWrapper$ObjectWrapper'\>

---

_[View the full topic](https://forum.inductiveautomation.com/t/bug-system-util-sendmessage-fails-with-remoteservers-when-payload-is-not-a-dict/55040)._
