Nesting Json directly does not seem to work with cJson ( atleast not on the ESP8266 with NodeMCU ) I found a solution by wrapping an array around the nested values.
p = 666
d = "23.42"
payload='{"d":[{"pres":'..(p)..',"temp":"'..(d)..'"}]}'
t = cjson.decode(payload)
print(t.d[1].temp) -- prints "23.42"
# Note 1 - this means you have to address the array before calling the variable t.d[1] - Arrays in Lua begin with the number 1 and are NOT zero-based like many other scripting languages.
# Note 2 - for some reason I got a 'Malformed number' error with the floating point value ( variable d ). As a string the value is decoded without error. I had to make the variable a string and put "double quotation marks" around the value.
--> ah I found out I was working on a integer version of nodeMCU - which apparently does not support floating point numbers ...