31.08.2015, 19:04
It looks like JSON type string, so the easiest way is to use already existed library, so:
Code:
local json = require "json"
stringfromsynology = [[{"data":{"sid":"IuGC4XNPXTzfkB3J4N01003"},"success":true}]]
local t = json.decode( stringfromsynology)
log(t) -- here you can see what json library done
if t.success == true then
sid_number = t.data.sid
end
log (sid_number)