Hello, I am creating a JSON file using several fme attributes. I want to include an if condition. If the typ =’HC’, I want to have an additional attribute (the name) added to the JSON. is it possible? The way the if condition is written here is not correct but it gives you an idea what I would like to do.
{"Device":
{
"Type": fme:get-attribute("TYP"),
"latitude": xs:decimal(fme:get-attribute("LAT")),
"longitude": xs:decimal(fme:get-attribute("LON")),
if fme:get-attribute("TYP") eq "HC"
then "Name": fme:get-attribute("NM")
}
}