10.06.2021, 09:26
You need to filter the table manually in a "for" loop. In this example the result table is populated will all items where the time field is not older than 1 day (86400 seconds).
Code:
items = storage.get('MyPowerLog', {})
result = {}
now = os.time()
mintime = now - 86400
for _, item in ipairs(items) do
if item.time >= mintime then
table.insert(result, item)
end
end
log(result)