cjson.decode() of a multi layer JSON
snippet in lua

cjson.decode() of a multi layer JSON

user6051

p=666
d=23.42
payload=[[
    { "d":
            {"pres": (p), "temp": (d)}
    }'
]]  
payload=payload:gsub("%((.-)%)",_G)
print(payload)