
Announcements
Hello,
I'm trying to create a table with column names specified in a variable.
I read that I can create a JSON object and use the variable as one of the property names, which I completed like so:
Set (jsnString, "{""items"":{""properties"":{" &
Concat(colTest,""" & Text(Value) & """: {""type"": ""string""},") &
"},""required"": [],""type"":""object""},""type"":""array""}");
Hi @Dewie68 ,
I assume there is a JSON string:
Set(jsnString,"[{""Column1"":""1"",""Column2"":""1"",""Column3"":""1"",""Column4"":""1""}]");
The code should be:
Set(jsnString,"[{""Column1"":""1"",""Column2"":""1"",""Column3"":""1"",""Column4"":""1""}]");
Set(myJSONObject, ParseJSON(jsnString));
ClearCollect(
coljson,
ForAll(
Table(myJSONObject),
{
Column1:Text(ThisRecord.Value.Column1),
Column2:Text(ThisRecord.Value.Column2),
Column3:Text(ThisRecord.Value.Column3),
Column4:Text(ThisRecord.Value.Column4)
}));
Best Regards,
Bof