Logic Machine Forum
table loose subtable in storage.set - Printable Version

+- Logic Machine Forum (https://forum.logicmachine.net)
+-- Forum: LogicMachine eco-system (https://forum.logicmachine.net/forumdisplay.php?fid=1)
+--- Forum: Scripting (https://forum.logicmachine.net/forumdisplay.php?fid=8)
+--- Thread: table loose subtable in storage.set (/showthread.php?tid=4212)



table loose subtable in storage.set - emme - 04.09.2022

hi to all,

I'm generating a dynamic table that should be saved to a stoarge at the end of the script.

This stable if quite dynamic and new keys can be created during the execution.

In particular I'm generating:


Code:
a general Table tree
  \ Year
      \ day
          \ Total by day
          \Hours
            \ 00
              ...
            \ 23


during the execution I dump to log the table and it is correct, but when I storage.set the table.... the table hours become empty
 Sad 

this is the json dump pf the table
Code:
{
  "lastSample":348,
  "description":"UNARETI - Linea principale 5.5kW",
  "lastTime":1662285437,
  "datiConsumo":{
    "2022":{
      "giorno":{
        "247":{
          "ora":{
            "12":"0.154666666666667"
            },
          "totale":"1.69234333333334"
          }
        },
      "mensile":{
        "9":"1.69234333333334"
        },
      "totale":"1.69234333333334",
      "settimana":{
        "35":"1.69234333333334"
        }
      },
  "totale":"1.69234333333334"
  }
}


this is the storage view for the same table (storage.set is the next instruction after the dump)
[Image: nZQcHX3l.png]

cannot figure out why I'm loosing the key Sad
thanks
ciao
Marco


RE: table loose subtable in storage.set - admin - 05.09.2022

There's a limit on how deep the table nesting can be. For storage it is up to 5 levels.