# Perspective Table props.data scripting to force array

**URL:** <https://forum.inductiveautomation.com/t/perspective-table-props-data-scripting-to-force-array/60053>\
**Category:** Ignition\
**Tags:** ignition80, perspective\
**Created:** [May 26, 2022, 10:51am UTC](https://forum.inductiveautomation.com/t/perspective-table-props-data-scripting-to-force-array/60053 "2022-05-26T10:51:37Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Cameronin](https://avatars.discourse-cdn.com/v4/letter/c/9fc29f/32.png) [@Cameronin](https://forum.inductiveautomation.com/u/Cameronin)\
**Post date:** [May 26, 2022, 10:51am UTC](https://forum.inductiveautomation.com/t/perspective-table-props-data-scripting-to-force-array/60053/1 "2022-05-26T10:51:37Z")

</div>

Hi folks

I’ve got a button that writes to a dataset tag that is then used to populate a table by converting the dataset to a dictionary as described here: [PyDataset to Dictionary](https://forum.inductiveautomation.com/t/pydataset-to-dictionary/38968)  
The tag binding is on table.custom.data, and table.props.data is bound to the custom data.  
At the moment, the dictionary is formatted as an object of objects. I need it to be an array of objects and can’t for the life of me work out how to convert/ force it to be through the bindings.

I can do it using the ‘change to array’ dropdown option, but I need it to be part of one or other of the bindings…  
Help?

Thanks

---

<div class="post-metadata">

**Author:** ![Transistor](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/transistor/32/3380_2.png) [@Transistor](https://forum.inductiveautomation.com/u/Transistor)\
**Post date:** [May 26, 2022, 2:53pm UTC](https://forum.inductiveautomation.com/t/perspective-table-props-data-scripting-to-force-array/60053/2 "2022-05-26T14:53:50Z")

</div>

Can you post the JSON here using the `</>` button for code formatting?  
If it’s really long then select it all, hit the gear icon and _Hide Details_ and you’ll get a cool expandable section in your post.

---

<div class="post-metadata">

**Author:** ![Cameronin](https://avatars.discourse-cdn.com/v4/letter/c/9fc29f/32.png) [@Cameronin](https://forum.inductiveautomation.com/u/Cameronin)\
**Post date:** [May 26, 2022, 3:10pm UTC](https://forum.inductiveautomation.com/t/perspective-table-props-data-scripting-to-force-array/60053/3 "2022-05-26T15:10:34Z")

</div>

I actually managed this by using the my\_dictionary.values() as the return, instead of just my-dictionary.  
So we’re all good!  
Thanks for the reply though @Transistor

---

<div class="post-metadata">

**Author:** ![lrose](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/lrose/32/62724_2.png) [@lrose](https://forum.inductiveautomation.com/u/lrose)\
**Post date:** [May 26, 2022, 3:14pm UTC](https://forum.inductiveautomation.com/t/perspective-table-props-data-scripting-to-force-array/60053/4 "2022-05-26T15:14:14Z")

</div>

@JordanCClark actually answered your question on the other thread.

> [@PyDataset to Dictionary](https://forum.inductiveautomation.com/t/pydataset-to-dictionary/38968/14):
>
> Not in front of anything to test it, but I think that it needs to be a list comprehension: NewArray = [dict(zip(pyData.columnNames,list(row))) for i,row in enumerate(pyData)]

---

<div class="post-metadata">

**Author:** ![Cameronin](https://avatars.discourse-cdn.com/v4/letter/c/9fc29f/32.png) [@Cameronin](https://forum.inductiveautomation.com/u/Cameronin)\
**Post date:** [May 26, 2022, 3:53pm UTC](https://forum.inductiveautomation.com/t/perspective-table-props-data-scripting-to-force-array/60053/5 "2022-05-26T15:53:39Z")

</div>

Ah! Thanks. I didn’t get a notification for that one for some reason!
