Using TVariant to create JS object
Example code : Using TVariant object to create javascript object
procedure TForm1.W3Button3Click(Sender: TObject);
var mData : variant;
begin
mData:=TVariant.CreateObject;
mData["test"] := TVariant.CreateObject;
mData["test"]["somevalue"] := 12;
mData["text"] := "this is a string value";
WriteLn(mData);
end;
{"test":{"somevalue":12},"text":"this is a string value"}