# 2d arrays as variables

**URL:** <https://forum.electromage.com/t/2d-arrays-as-variables/2238>\
**Category:** Troubleshooting\
**Created:** [June 13, 2022, 8:27pm UTC](https://forum.electromage.com/t/2d-arrays-as-variables/2238 "2022-06-13T20:27:47Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![wizard](https://forum.electromage.com/user_avatar/forum.electromage.com/wizard/32/4_2.png) [@wizard](https://forum.electromage.com/u/wizard)\
**Post date:** [June 13, 2022, 9:53pm UTC](https://forum.electromage.com/t/2d-arrays-as-variables/2238/2 "2022-06-13T21:53:23Z")

</div>

Take a look here

> [@Pattern for Manual Control of Pixels via WebSockets?](https://forum.electromage.com/t/pattern-for-manual-control-of-pixels-via-websockets/1240/2):
>
> Hi @xd1936 , Unfortunately setVars doesn’t support nested arrays, so you can’t use it to set a 2 dimensional array (array of arrays) in order to structure it like you have in your pattern above. Check out the work @zranger1 has done for an sACN proxy, which does something similar. The idea is to pack the 3 RGB bytes into a single value and use setVars API to fill the array, then use a pattern to [unpack the value](https://github.com/zranger1/pb-sacn-proxy/blob/main/rgb-sacn-listener.js) back into RGB. With some more [context here](https://forum.electromage.com/t/pixelblaze-client-python-3-library-for-pixelblaze/756/10) You could also use unpacked RGB va…

For my reply to an almost identical question.

---

_[View the full topic](https://forum.electromage.com/t/2d-arrays-as-variables/2238)._
