Which i then replace with regexp.
How can i have it just yield following result?
"amount" : 10000
I'd like to have it solved inthe Templater rather then resorting to regexp clean-up.
Tx in advance to all.
Which i then replace with regexp.
How can i have it just yield following result?
"amount" : 10000
I'd like to have it solved inthe Templater rather then resorting to regexp clean-up.
Tx in advance to all.
Hello @gio
As the if then keywords are quoted, they are added to the JSON output.
Try the following XQuery expression in the JSONTemplater to get the desired output.
{if(fme:get-list-attribute("_list{}.IDENTIFICERENDE WAARDE") = "R")
then {"Value": @Value(_list{1}.BDRG_NETTO)}
else {}}
I hope this information helps.
Hi Debbie
Yes it helped.
Also i found out, after i asked the question that my snippet is javascript en not jason script.
Indeed i needed to take the if then out of the json part.
I have it like this now and it does it's job.
Ill SaS your answer.
"amount":
{
{ if(fme:get-list-attribute("_list{}.IDENTIFICERENDE WAARDE") = "R")
then { @Value(_list{1}.BDRG_NETTO)}
else {}}
}
tx for help.!