Reputation: 31
I'm using SuperObject to work with Json/Delphi I have a function that take a string and create a var superobject type, I need to check if it has an object (in my case is 'smtp') and if it don't, i create. The problem is: 'smtp' has children, example smtp.address and I have to create smtp and all its children, but my function doesn't work.
My Code:
if js.o['smtp'] = nil then
js.o['smtp'].S['address']:= 'justATest';
Can anyone help me?
I'm using Delphi 2007 with SuperObject Unit
Upvotes: 3
Views: 806
Reputation: 989
if js['smtp'] = nil then
js.S['smtp.address']:= 'justATest';
Upvotes: 4