Saving and accessing bi-dimensional variables

Hi,

my flows should make use of several variables with this format:

var1 = "0615", "value1"
var2 = "875", "value2"
var3 = "745", "value3"
...

I am trying to set/get the variables, but I got lost....
Thanks for any help.

Is 0615 in some way the value of value1?
Also what are you going to do with them?

Variables can also be arrays!

no. 0615 is the ID.

So is "value1" a value (number?) representing something about device(?) 0615? and "value2" is the same thing but for device 875?

Correct

  • Sent from my mobile phone. Sorry for typos -

OK, in that case one solution may be to store the data in objects of the form
{id: "0615, value: 7}
or perhaps
{id: "0615, temperature: 73}
or
{id: "0615, operator: "fred"}
Perhaps you need an array of those, one for each device. It depends what you want to do with the data.

1 Like