Skip to main content
Question

Replace null values in JSONTemplater

  • July 20, 2020
  • 1 reply
  • 28 views

Forum|alt.badge.img

I currently have a template like this:-

    {
    "pd_id" : fme:get-attribute("pd_id"),
    "name":fme:get-attribute("district_name"),
    "code" :fme:get-attribute("district_code")
    }

 

 

Is it possible to add a rule that says: IF district_name is null then name = fme:get-attribute("pd_id")

1 reply

takashi
Influencer
  • July 20, 2020

Hi @davebarter, I think it would be easier to change the value of district_name to the value of pd_id if it was null, using an AttributeManager with Conditioinal Value setting before the JSONTemplater.


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings