โ01-02-2019 04:45 PM
i canโt seem to get the json Parse method working when using a variable.
I am trying to get the following output
โcustomfield_11401โ: [
{
โvalueโ: โ1223-CUST-A1โ
}
]
I am trying to use the following expression but getting an error. Any help is appreciated.
JSON.parse(โ[{โvalueโ: โ+$dataCenterValue+โ}]โ)
โ01-02-2019 05:41 PM
Try this โฆ
โ01-03-2019 07:27 AM
I would advise against constructing strings to pass to a parser since itโs easy to get escaping wrong. As mentioned in another reply, you can use the target path in the Mapper to write the field. Or, you can use literal syntax directly to construct arrays/objects, like so:
[{
"value": $dataCenterValue
}]
You can then use a mapper to write that to $customfield_11401
.
โ01-03-2019 09:08 AM