Using Variant to create arbitrary inline JS object
Example code : Using Variant to create arbitrary javascript object
var v: Variant;
Begin
v.rec := record
Field = 'hello';
Value : Integer = someVar+someFuncCall(anotherVar);
'dotted.weird$name' := #"Lorem ipsum dolor sit amet"
end;
{
"Field" : "hello",
"Value" : someVar+someFuncCall(anotherVar),
"dotted.weird$name" : "Lorem ipsum\ndolor sit amet"
}