# Changeable multidimensional array

**URL:** <https://discourse.nodered.org/t/changeable-multidimensional-array/53515>\
**Category:** Dashboard\
**Created:** [10 November 2021 15:02 UTC](https://discourse.nodered.org/t/changeable-multidimensional-array/53515 "2021-11-10T15:02:24Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![Andreas703](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/andreas703/32/26326_2.png) [@Andreas703](https://discourse.nodered.org/u/Andreas703)\
**Post date:** [10 November 2021 15:02 UTC](https://discourse.nodered.org/t/changeable-multidimensional-array/53515/1 "2021-11-10T15:02:24Z")

</div>

Hi,  
is it possible to show an multidimensional array and update this with the dashboard ui?

Can you help pls?

I try to get an multidimensional array into dashboard(the whole array has 1000 arrays), this is the first problem:

```auto

alarmtexte=[["000",0,0,20000,"Phase fehlt"],
["001",0,0,20000,"Steuerspannung Stoerung"],
["002",0,0,20000,"Not Aus"],
["003",0,0,20000,"24V Stoerung"],
["004",0,0,20000," Batterie MIN"]]

flow.set("Alarmtexte",alarmtexte);

```

and then I want to edit for eg the 20000.

I have already searched for hours, if someone has something similar, but without success.

Can you help me?

---

<div class="post-metadata">

**Author:** ![framatech](https://avatars.discourse-cdn.com/v4/letter/f/87869e/32.png) [@framatech](https://discourse.nodered.org/u/framatech)\
**Post date:** [10 November 2021 15:49 UTC](https://discourse.nodered.org/t/changeable-multidimensional-array/53515/2 "2021-11-10T15:49:44Z")

</div>

Hi Andreas!

I'm also looking for the same approach. Hope the community can help here!

Thanks a lot in advance

---

<div class="post-metadata">

**Author:** ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)\
**Post date:** [10 November 2021 16:12 UTC](https://discourse.nodered.org/t/changeable-multidimensional-array/53515/3 "2021-11-10T16:12:05Z")

</div>

> [@Andreas703](#):
>
> and then I want to edit for eg the 20000.

What exactly do you mean? Do you mean you want to change the fourth element in every contained array to something different? If so then you can use the [javacscript map()](https://www.w3schools.com/jsref/jsref_map.asp) function in a Function node to do that. Have a play with the examples in the link (in a function node) to see how it works. Then ask again if you still can't work it out.

---

<div class="post-metadata">

**Author:** ![Andreas703](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/andreas703/32/26326_2.png) [@Andreas703](https://discourse.nodered.org/u/Andreas703)\
**Post date:** [10 November 2021 17:24 UTC](https://discourse.nodered.org/t/changeable-multidimensional-array/53515/4 "2021-11-10T17:24:45Z")

</div>

Hi Colin,  
No, I mean I want to edit for e.g.: alarmtexte[0][3] in an inputbox in the dashboard template ui.  
The full array should be in an table, like that when you push the array to the ui table. But I want to edit the single values

Javascript isn't the big problem, but AngularJS is not my language

---

<div class="post-metadata">

**Author:** ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)\
**Post date:** [10 November 2021 17:28 UTC](https://discourse.nodered.org/t/changeable-multidimensional-array/53515/5 "2021-11-10T17:28:55Z")

</div>

Ok, you didn't mention ui-table. Sorry, I don't know about ui-table. Are you able to get the data into the table and see it?

---

<div class="post-metadata">

**Author:** ![Andreas703](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/andreas703/32/26326_2.png) [@Andreas703](https://discourse.nodered.org/u/Andreas703)\
**Post date:** [10 November 2021 18:49 UTC](https://discourse.nodered.org/t/changeable-multidimensional-array/53515/6 "2021-11-10T18:49:37Z")

</div>

Yes I can get it in the ui table and can see it, but there I cant edit it, and normally I tried to get it in the ui-template but it didnt work.

 ![grafik](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/3/4/34a83263de4250812e413e807209a6a102c5b208.png)

[{"id":"d38f5dbf74ac9184","type":"ui\_table","z":"e6324b52869b1a66","group":"0a759dda9cb883ae","name":"","order":0,"width":"10","height":"8","columns":,"outputs":0,"cts":false,"x":910,"y":100,"wires":},{"id":"1a7b59ab486f5f91","type":"function","z":"e6324b52869b1a66","name":"","func":"alarmtexte=[["000",0,0,20000,"Phase fehlt"],\n["001",0,0,20000,"Steuerspannung Stoerung"],\n["002",0,0,20000,"Not Aus"],\n["003",0,0,20000,"24V Stoerung"],\n["004",0,0,20000," Batterie MIN"]]\n\nflow.set("Alarmtexte",alarmtexte);\nmsg.payload=alarmtexte;\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":,"x":690,"y":100,"wires":[["d38f5dbf74ac9184","623ae5652a5b62f5"]]},{"id":"dd734dc07a97dcd8","type":"inject","z":"e6324b52869b1a66","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":530,"y":100,"wires":[["1a7b59ab486f5f91"]]},{"id":"623ae5652a5b62f5","type":"ui\_template","z":"e6324b52869b1a66","group":"0a759dda9cb883ae","name":"","order":0,"width":"10","height":"5","format":"\n\<tr ng-repeat = “payload in msg.payload”\>\n \<td ng-repeat =”payload in payload”\>{{payload}}

","storeOutMessages":true,"fwdInMessages":true,"resendOnRefresh":true,"templateScope":"local","className":"","x":950,"y":160,"wires":[]},{"id":"0a759dda9cb883ae","type":"ui\_group","name":"test","tab":"7d587f690b13b3ac","order":2,"disp":true,"width":"10","collapse":false,"className":""},{"id":"7d587f690b13b3ac","type":"ui\_tab","name":"test2","icon":"dashboard","disabled":false,"hidden":false}]

---

<div class="post-metadata">

**Author:** ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)\
**Post date:** [10 November 2021 21:33 UTC](https://discourse.nodered.org/t/changeable-multidimensional-array/53515/7 "2021-11-10T21:33:01Z")

</div>

> [@Andreas703](#):
>
> but there I cant edit it,

I can't help there, sorry. I think there have been a number of posts on editing ui-table entries so start by searching the forum. If still stuck then start a new thread with a subject line that describes the problem, which is how to edit the contents of ui-table cells.

---

<div class="post-metadata">

**Author:** ![Andreas703](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/andreas703/32/26326_2.png) [@Andreas703](https://discourse.nodered.org/u/Andreas703)\
**Post date:** [30 November 2021 07:07 UTC](https://discourse.nodered.org/t/changeable-multidimensional-array/53515/8 "2021-11-30T07:07:55Z")

</div>

Thank you all for the answers, I'm using JSgrid now, and it works like I want

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/1X/d073cd938eafa2e558d7c2cd59003b3ef4963033.png) [@system](https://discourse.nodered.org/u/system)\
**Post date:** [14 December 2021 07:08 UTC](https://discourse.nodered.org/t/changeable-multidimensional-array/53515/9 "2021-12-14T07:08:01Z")

</div>

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.
