# Arranging exposed particle.variables

**URL:** <https://community.particle.io/t/arranging-exposed-particle-variables/41240>\
**Category:** Cloud\
**Created:** [April 18, 2018, 9:34pm UTC](https://community.particle.io/t/arranging-exposed-particle-variables/41240 "2018-04-18T21:34:35Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![bjjesteadt](https://avatars.discourse-cdn.com/v4/letter/b/3be4f8/32.png) [@bjjesteadt](https://community.particle.io/u/bjjesteadt)\
**Post date:** [April 18, 2018, 9:34pm UTC](https://community.particle.io/t/arranging-exposed-particle-variables/41240/1 "2018-04-18T21:34:35Z")

</div>

Hi everyone,  
Is there a way to arrange particle.variables when they display on the app? I can get them all to display fine, but they don’t display in the same order in the particle app as they do in my code. They seem to show up in a completely random order.

Basically, I’d like my particle.variables to appear in the order I exposed them in my code.  
I can post code if necessary, but as variables are pretty straightforward I don’t know if that’s necessary?  
Thanks!

---

<div class="post-metadata">

**Author:** ![BulldogLowell](https://sea2.discourse-cdn.com/flex026/user_avatar/community.particle.io/bulldoglowell/32/4305_2.png) [@BulldogLowell](https://community.particle.io/u/BulldogLowell)\
**Post date:** [April 18, 2018, 9:43pm UTC](https://community.particle.io/t/arranging-exposed-particle-variables/41240/2 "2018-04-18T21:43:15Z")

</div>

> [@bjjesteadt](#):
>
> when they display on the app

which app? The online console... the iphone app... android app...

---

<div class="post-metadata">

**Author:** ![bjjesteadt](https://avatars.discourse-cdn.com/v4/letter/b/3be4f8/32.png) [@bjjesteadt](https://community.particle.io/u/bjjesteadt)\
**Post date:** [April 18, 2018, 9:56pm UTC](https://community.particle.io/t/arranging-exposed-particle-variables/41240/3 "2018-04-18T21:56:57Z")

</div>

The iPhone app. Sorry, that was rather ambiguous.

---

<div class="post-metadata">

**Author:** ![Moors7](https://sea2.discourse-cdn.com/flex026/user_avatar/community.particle.io/moors7/32/588_2.png) [@Moors7](https://community.particle.io/u/Moors7)\
**Post date:** [April 18, 2018, 10:12pm UTC](https://community.particle.io/t/arranging-exposed-particle-variables/41240/4 "2018-04-18T22:12:25Z")

</div>

Regardless of where they’re exposed, I don’t think the order at which you programmed them is taken into consideration. What specific need do you have to display them in a certain order?  
If you’re developing an app of your own, you could be in full control of the order in which they appear.

---

<div class="post-metadata">

**Author:** ![bjjesteadt](https://avatars.discourse-cdn.com/v4/letter/b/3be4f8/32.png) [@bjjesteadt](https://community.particle.io/u/bjjesteadt)\
**Post date:** [April 18, 2018, 10:26pm UTC](https://community.particle.io/t/arranging-exposed-particle-variables/41240/5 "2018-04-18T22:26:43Z")

</div>

Alright, thanks. The variables I’m exposing are related to eachother (they appear one after another on a physical display I’m making). I just thought it would be nice to see them in the same order on the app.

---

<div class="post-metadata">

**Author:** ![Ric](https://sea2.discourse-cdn.com/flex026/user_avatar/community.particle.io/ric/32/514_2.png) [@Ric](https://community.particle.io/u/Ric)\
**Post date:** [April 18, 2018, 10:38pm UTC](https://community.particle.io/t/arranging-exposed-particle-variables/41240/6 "2018-04-18T22:38:02Z")

</div>

From the docs:

> variables is a dictionary in which keys are variable names and values are variable types

Dictionaries in iOS are inherently unordered collections, and the code in the Tinker app doesn't order them in any way, thus they are random. Even if the code ordered them, I don't think there is a way to make the order the same as the way you exposed them (they could have been ordered alphabetically, for instance, but the current code doesn't do that).

How are you populating this physical display with the variable names? I don't see how what appears on that display is related to the Tinker variable list.

---

<div class="post-metadata">

**Author:** ![bjjesteadt](https://avatars.discourse-cdn.com/v4/letter/b/3be4f8/32.png) [@bjjesteadt](https://community.particle.io/u/bjjesteadt)\
**Post date:** [April 18, 2018, 11:39pm UTC](https://community.particle.io/t/arranging-exposed-particle-variables/41240/7 "2018-04-18T23:39:18Z")

</div>

It’s no big deal. I’ve got integers that display on the device. I put them in the app so I can see what’s on the device when I’m not nearby.  
It doesnt actually use the app in any way.
