title: Node-red: How to have an editable u-list?
body: <p>I'm have a question about Node-red, hope someone can help me.
  In my project I need to send a txt file to a few esp32 clients.</p>
  <p>I managed to get the .txt file to 1 esp32 client, but what I'll need is to send to several clients, tahnt can vary.</p>
  <p>So what I'm trring to get is have an editable list of esp32 clients ( which will turn into subscribed subscribed topics I'm be updating lets say, e.g.: Client_1, Client_2..etc).</p>
  <p>I found the node-red-node-ui-list weeks days example with radio buttons (here 1) to be a perfect display for what I need, the thing is, how to produce and editable list that would feed the ui-list demands.</p>
  <p>The ui-list needs data in this format <code>[{&quot;title&quot;:&quot;Esp32&quot;,&quot;isChecked&quot;:false}]</code>.</p>
  <p>I managed to produce a list of names: <code>[&quot;Client_1&quot;,&quot;Client_2&quot;]</code>, resorting to an input box that but what I'm not getting able to do is turn this list of names into a list or series (not sure what to call it) that I can feed the ui-list.</p>
  <p>In ui-list example we can see how multiple elements should be fed to the list widget:</p>
  <pre><code>[{&quot;title&quot;:&quot;Sunday&quot;,&quot;isChecked&quot;:true},{&quot;title&quot;:&quot;Monday&quot;},{&quot;title&quot;:&quot;Tuesday&quot;},{&quot;title&quot;:&quot;Wednesday&quot;},{&quot;title&quot;:&quot;Thursday&quot;},{&quot;title&quot;:&quot;Friday&quot;},{&quot;title&quot;:&quot;Saturday&quot;,&quot;isChecked&quot;:true}] 
  </code></pre>
  <p>This seems like an list of JSON objects where title and isChecked are the keys, am I right?</p>
  <p>the question, hot to get from a list of strings <code>[&quot;Client_1&quot;,&quot;Client_2&quot;]</code> to that list of objects =
  Its a lack of javascript skills for sure.</p>
  <p>if anyone has any example or answer that might help me I'm very grateful.</p>
  <p>Eventually a delete option would probably be also useful.</p>
  <p>And still have to figure out hou to have this list permanent (don't loose it in every reset or power-off).</p>
  <p>Here is my current flow, where i can, measure the length, print and delete a global list:</p>
  <pre><code>[
      {
          &quot;id&quot;: &quot;81b5cdfd56ea7bbc&quot;,
          &quot;type&quot;: &quot;tab&quot;,
          &quot;label&quot;: &quot;Flow 4&quot;,
          &quot;disabled&quot;: false,
          &quot;info&quot;: &quot;&quot;,
          &quot;env&quot;:
          []
      },
      {
          &quot;id&quot;: &quot;9422ceb76fba4d42&quot;,
          &quot;type&quot;: &quot;inject&quot;,
          &quot;z&quot;: &quot;81b5cdfd56ea7bbc&quot;,
          &quot;name&quot;: &quot;Read length&quot;,
          &quot;props&quot;:
          [
              {
                  &quot;p&quot;: &quot;payload&quot;
              },
              {
                  &quot;p&quot;: &quot;topic&quot;,
                  &quot;vt&quot;: &quot;str&quot;
              }
          ],
          &quot;repeat&quot;: &quot;&quot;,
          &quot;crontab&quot;: &quot;&quot;,
          &quot;once&quot;: false,
          &quot;onceDelay&quot;: 0.1,
          &quot;topic&quot;: &quot;&quot;,
          &quot;payload&quot;: &quot;Ola&quot;,
          &quot;payloadType&quot;: &quot;str&quot;,
          &quot;x&quot;: 510,
          &quot;y&quot;: 260,
          &quot;wires&quot;:
          [
              [
                  &quot;f9ad60dcd7d9447a&quot;
              ]
          ]
      },
      {
          &quot;id&quot;: &quot;c4c42d4670044e4f&quot;,
          &quot;type&quot;: &quot;debug&quot;,
          &quot;z&quot;: &quot;81b5cdfd56ea7bbc&quot;,
          &quot;name&quot;: &quot;Read length&quot;,
          &quot;active&quot;: true,
          &quot;tosidebar&quot;: true,
          &quot;console&quot;: false,
          &quot;tostatus&quot;: false,
          &quot;complete&quot;: &quot;payload&quot;,
          &quot;targetType&quot;: &quot;msg&quot;,
          &quot;statusVal&quot;: &quot;&quot;,
          &quot;statusType&quot;: &quot;auto&quot;,
          &quot;x&quot;: 1110,
          &quot;y&quot;: 260,
          &quot;wires&quot;:
          []
      },
      {
          &quot;id&quot;: &quot;f9ad60dcd7d9447a&quot;,
          &quot;type&quot;: &quot;function&quot;,
          &quot;z&quot;: &quot;81b5cdfd56ea7bbc&quot;,
          &quot;name&quot;: &quot;Read length&quot;,
          &quot;func&quot;: &quot;\nvar fs = global.get('deviceList')||0;\n\n//fs[fs.length + 1] = msg.payload;\n\n//msg.payload = fs.length;\n//msg = { payload:fs[33]}\nmsg = { payload:fs.length}\nif (!msg.payload) msg.payload=\&quot;Vazio\&quot;;\n//msg.payload=[{ \&quot;title\&quot;: msg.payload, \&quot;isChecked\&quot;: false }];\n//return msg;\nreturn msg;&quot;,
          &quot;outputs&quot;: 1,
          &quot;noerr&quot;: 0,
          &quot;initialize&quot;: &quot;&quot;,
          &quot;finalize&quot;: &quot;&quot;,
          &quot;libs&quot;:
          [],
          &quot;x&quot;: 810,
          &quot;y&quot;: 260,
          &quot;wires&quot;:
          [
              [
                  &quot;c4c42d4670044e4f&quot;
              ]
          ]
      },
      {
          &quot;id&quot;: &quot;82a053ecc65e397e&quot;,
          &quot;type&quot;: &quot;inject&quot;,
          &quot;z&quot;: &quot;81b5cdfd56ea7bbc&quot;,
          &quot;name&quot;: &quot;Add element&quot;,
          &quot;props&quot;:
          [
              {
                  &quot;p&quot;: &quot;payload&quot;
              },
              {
                  &quot;p&quot;: &quot;topic&quot;,
                  &quot;vt&quot;: &quot;str&quot;
              }
          ],
          &quot;repeat&quot;: &quot;&quot;,
          &quot;crontab&quot;: &quot;&quot;,
          &quot;once&quot;: false,
          &quot;onceDelay&quot;: 0.1,
          &quot;topic&quot;: &quot;&quot;,
          &quot;payload&quot;: &quot;Client_1&quot;,
          &quot;payloadType&quot;: &quot;str&quot;,
          &quot;x&quot;: 510,
          &quot;y&quot;: 340,
          &quot;wires&quot;:
          [
              [
                  &quot;4c0274504c14fe11&quot;
              ]
          ]
      },
      {
          &quot;id&quot;: &quot;8aa2953926e0644a&quot;,
          &quot;type&quot;: &quot;debug&quot;,
          &quot;z&quot;: &quot;81b5cdfd56ea7bbc&quot;,
          &quot;name&quot;: &quot;Add element&quot;,
          &quot;active&quot;: true,
          &quot;tosidebar&quot;: true,
          &quot;console&quot;: false,
          &quot;tostatus&quot;: false,
          &quot;complete&quot;: &quot;payload&quot;,
          &quot;targetType&quot;: &quot;msg&quot;,
          &quot;statusVal&quot;: &quot;&quot;,
          &quot;statusType&quot;: &quot;auto&quot;,
          &quot;x&quot;: 1110,
          &quot;y&quot;: 340,
          &quot;wires&quot;:
          []
      },
      {
          &quot;id&quot;: &quot;4c0274504c14fe11&quot;,
          &quot;type&quot;: &quot;function&quot;,
          &quot;z&quot;: &quot;81b5cdfd56ea7bbc&quot;,
          &quot;name&quot;: &quot;Add element&quot;,
          &quot;func&quot;: &quot;const fsd = 'deviceList';\n\nlet fs = global.get(fsd) || [];\n\nglobal.set(fsd, fs);\n\nfs[fs.length] = msg.payload;\n\n\n//msg.payload = fs.length;\n//msg = { payload:fs[33]}\n//msg = { payload:fs.length}\n\n//msg.payload=[{ \&quot;title\&quot;: msg.payload, \&quot;isChecked\&quot;: false }];\n//return msg;\nreturn msg;&quot;,
          &quot;outputs&quot;: 1,
          &quot;noerr&quot;: 0,
          &quot;initialize&quot;: &quot;&quot;,
          &quot;finalize&quot;: &quot;&quot;,
          &quot;libs&quot;:
          [],
          &quot;x&quot;: 810,
          &quot;y&quot;: 340,
          &quot;wires&quot;:
          [
              [
                  &quot;8aa2953926e0644a&quot;
              ]
          ]
      },
      {
          &quot;id&quot;: &quot;755407d906abd3bc&quot;,
          &quot;type&quot;: &quot;inject&quot;,
          &quot;z&quot;: &quot;81b5cdfd56ea7bbc&quot;,
          &quot;name&quot;: &quot;Read deviceList&quot;,
          &quot;props&quot;:
          [
              {
                  &quot;p&quot;: &quot;payload&quot;
              },
              {
                  &quot;p&quot;: &quot;topic&quot;,
                  &quot;vt&quot;: &quot;str&quot;
              }
          ],
          &quot;repeat&quot;: &quot;&quot;,
          &quot;crontab&quot;: &quot;&quot;,
          &quot;once&quot;: false,
          &quot;onceDelay&quot;: 0.1,
          &quot;topic&quot;: &quot;&quot;,
          &quot;payload&quot;: &quot;Ola&quot;,
          &quot;payloadType&quot;: &quot;str&quot;,
          &quot;x&quot;: 520,
          &quot;y&quot;: 300,
          &quot;wires&quot;:
          [
              [
                  &quot;6510945a12641605&quot;
              ]
          ]
      },
      {
          &quot;id&quot;: &quot;b731204d6fe17dfe&quot;,
          &quot;type&quot;: &quot;debug&quot;,
          &quot;z&quot;: &quot;81b5cdfd56ea7bbc&quot;,
          &quot;name&quot;: &quot;Read deviceList&quot;,
          &quot;active&quot;: true,
          &quot;tosidebar&quot;: true,
          &quot;console&quot;: false,
          &quot;tostatus&quot;: false,
          &quot;complete&quot;: &quot;payload&quot;,
          &quot;targetType&quot;: &quot;msg&quot;,
          &quot;statusVal&quot;: &quot;&quot;,
          &quot;statusType&quot;: &quot;auto&quot;,
          &quot;x&quot;: 1120,
          &quot;y&quot;: 300,
          &quot;wires&quot;:
          []
      },
      {
          &quot;id&quot;: &quot;6510945a12641605&quot;,
          &quot;type&quot;: &quot;function&quot;,
          &quot;z&quot;: &quot;81b5cdfd56ea7bbc&quot;,
          &quot;name&quot;: &quot;Read deviceList&quot;,
          &quot;func&quot;: &quot;\nvar deviceList = global.get('deviceList');\n\n//fs[fs.length + 1] = msg.payload;\n\n//msg.payload = fs.length;\n//msg = { payload:fs[33]}\nmsg = { payload: deviceList}\n\n//msg.payload=[{ \&quot;title\&quot;: msg.payload, \&quot;isChecked\&quot;: false }];\n//return msg;\nreturn msg;&quot;,
          &quot;outputs&quot;: 1,
          &quot;noerr&quot;: 0,
          &quot;initialize&quot;: &quot;&quot;,
          &quot;finalize&quot;: &quot;&quot;,
          &quot;libs&quot;:
          [],
          &quot;x&quot;: 820,
          &quot;y&quot;: 300,
          &quot;wires&quot;:
          [
              [
                  &quot;b731204d6fe17dfe&quot;
              ]
          ]
      },
      {
          &quot;id&quot;: &quot;b6e926ea63f838f3&quot;,
          &quot;type&quot;: &quot;inject&quot;,
          &quot;z&quot;: &quot;81b5cdfd56ea7bbc&quot;,
          &quot;name&quot;: &quot;Delete list&quot;,
          &quot;props&quot;:
          [
              {
                  &quot;p&quot;: &quot;payload&quot;
              },
              {
                  &quot;p&quot;: &quot;topic&quot;,
                  &quot;vt&quot;: &quot;str&quot;
              }
          ],
          &quot;repeat&quot;: &quot;&quot;,
          &quot;crontab&quot;: &quot;&quot;,
          &quot;once&quot;: false,
          &quot;onceDelay&quot;: 0.1,
          &quot;topic&quot;: &quot;&quot;,
          &quot;payload&quot;: &quot;&quot;,
          &quot;payloadType&quot;: &quot;date&quot;,
          &quot;x&quot;: 500,
          &quot;y&quot;: 380,
          &quot;wires&quot;:
          [
              [
                  &quot;a9b54a8c025573b7&quot;
              ]
          ]
      },
      {
          &quot;id&quot;: &quot;cf15719dd8237868&quot;,
          &quot;type&quot;: &quot;debug&quot;,
          &quot;z&quot;: &quot;81b5cdfd56ea7bbc&quot;,
          &quot;name&quot;: &quot;Delete deviceList&quot;,
          &quot;active&quot;: true,
          &quot;tosidebar&quot;: true,
          &quot;console&quot;: false,
          &quot;tostatus&quot;: false,
          &quot;complete&quot;: &quot;payload&quot;,
          &quot;targetType&quot;: &quot;msg&quot;,
          &quot;statusVal&quot;: &quot;&quot;,
          &quot;statusType&quot;: &quot;auto&quot;,
          &quot;x&quot;: 1130,
          &quot;y&quot;: 380,
          &quot;wires&quot;:
          []
      },
      {
          &quot;id&quot;: &quot;a9b54a8c025573b7&quot;,
          &quot;type&quot;: &quot;change&quot;,
          &quot;z&quot;: &quot;81b5cdfd56ea7bbc&quot;,
          &quot;name&quot;: &quot;&quot;,
          &quot;rules&quot;:
          [
              {
                  &quot;t&quot;: &quot;delete&quot;,
                  &quot;p&quot;: &quot;deviceList&quot;,
                  &quot;pt&quot;: &quot;global&quot;
              }
          ],
          &quot;action&quot;: &quot;&quot;,
          &quot;property&quot;: &quot;&quot;,
          &quot;from&quot;: &quot;&quot;,
          &quot;to&quot;: &quot;&quot;,
          &quot;reg&quot;: false,
          &quot;x&quot;: 850,
          &quot;y&quot;: 380,
          &quot;wires&quot;:
          [
              [
                  &quot;cf15719dd8237868&quot;
              ]
          ]
      }
  ]
  </code></pre>