I want to convert my data from a table in PowerApps into JSON format.
Here's my Data:
Here's my current code:
Set(
varJSONProductTagging,
JSON(
<-Source->,
"ProductCode",
"Description",
"KPICode",
"DSLType"
),
JSONFormat.IndentFour
));
Here's the result:
[{
"ProductCode": "SD204",
"Description": "Broadband Business SDSL 2Mb - Managed",
"KPICode": "DSL3",
"DSLType": "SDSL"
},
{
"ProductCode": "SD219",
"Description": "Broadband Business SDSL 2Mb - Wires Only",
"KPICode": "DSL3",
"DSLType": "SDSL"
},
{
"ProductCode": "IOMDDI35",
"Description": "ISDN DDI: Nobles Hospital - 650000"
}]
As you can see, on the 3rd set, KPICode and DSL Type are missing because they are null. What I want to do is to still include the columns with its value set to null. Like this:
[
{
"ProductCode": "SD204",
"Description": "Broadband Business SDSL 2Mb - Managed",
"KPICode": "DSL3",
"DSLType": "SDSL"
},
{
"ProductCode": "SD219",
"Description": "Broadband Business SDSL 2Mb - Wires Only",
"KPICode": "DSL3",
"DSLType": "SDSL"
},
{
"ProductCode": "IOMDDI35",
"Description": "ISDN DDI: Nobles Hospital - 650000"
"KPICode": null,
"DSLType": null
}
]
Any way I can do that in powerapps?