16.09.2020, 09:35
(This post was last modified: 16.09.2020, 09:36 by gjniewenhuijse.)
i have a table and i want to use this data, like:
But from my others system i received the following:
id = 21
value = true
type = value or battery
how to use type (value or battery) as input? something like:
But this example doesn't work.
Code:
dev =
{
[21] = {value='10/1/1',battery='10/1/2'},
[24] = {value='15/1/1'}
}
log(dev[21].value)
But from my others system i received the following:
id = 21
value = true
type = value or battery
how to use type (value or battery) as input? something like:
Code:
dev =
{
[21] = {value='10/1/1',battery='10/1/2'},
[24] = {value='15/1/1'}
}
type = 'value'
log(dev[21].type)