Hi,
I would like to understand the difference in output between the Template column and the JSON Template column in this specific case. I am trying to create a API payload for the Call API like this:
1. Using a JSON Object column to create columnValues. The column outputs this:
{
"1RRR0": "rRoW8v6HT4qJoTSb1fIDcw",
"Usz92": "d11e140a-877a-41b0-b530-3769d17ab3cb"
}
2. Using a JavaScript column to create mutations. The column outputs this:
[{"kind": "add-row-to-table", "tableName": "native-table-OixoB8WxaCD1brEuIgw2", "columnValues": {"1RRR0":"IAj1kNiHSbG1dUa3Xzy3yg","Usz92":"ff90fdcd-11a4-4ca2-8084-8e5baa1b7da3"}}]
3. When using a JSON Template columnd to create the payload it looks like it is converting the array into a string, because the output looks like this:
{
"appID": "Xn0neojnKCfEmqgybd6D",
"mutations": "[{\"kind\": \"add-row-to-table\", \"tableName\": \"native-table-OixoB8WxaCD1brEuIgw2\", \"columnValues\": {\"1RRR0\":\"IAj1kNiHSbG1dUa3Xzy3yg\",\"Usz92\":\"ff90fdcd-11a4-4ca2-8084-8e5baa1b7da3\"}}]"
}
However, when I use a normal template column with the same settings, I get the output that I need to create the payload:
{
"appID": "Xn0neojnKCfEmqgybd6D",
"mutations": [{"kind": "add-row-to-table", "tableName": "native-table-OixoB8WxaCD1brEuIgw2", "columnValues": {"1RRR0":"IAj1kNiHSbG1dUa3Xzy3yg","Usz92":"ff90fdcd-11a4-4ca2-8084-8e5baa1b7da3"}}]
}
Can someone please explain why this is happening? I am trying my best to learn JSON and use it more, but I am really struggling to understand it