0

I am using liquid template in my LogicApp for data transformation. I need to differentiate if a json node is empty, null.

So in json if i have "Name":"" "Name":null , then I need to differentiate between them. I observed that all the below 3 conditions(== "" , == empty == blank) return true for both of these cases. So how I explicitly check if it is null or just ""

{% if content.Name == "" %}

{% endif %}

{% if content.Name == empty %}

{% endif %}

{% if content.Name == blank %}

{% endif %}
techresearch
  • 119
  • 3
  • 14
  • Does this work: `{% if content.Name == null %}`? – Frank Borzage Jun 16 '21 at 09:29
  • {% if content.Name == null %} will not help i have tried this already – techresearch Jun 16 '21 at 17:08
  • @techresearch, did you manage to find a way? I'm having the same problem and i even tried to compare against nil... i honestly don't understand all the hype using liquid for JSON... i even have to deal with the quotes :S – FEST May 06 '22 at 08:56
  • @FEST I didn't get any solution to this, Let me know if you have got any fix. – techresearch Dec 27 '22 at 10:32
  • Unfortunately no. Fortunately for me, I found that the end system treats nulls ad empties the same way so that made things simpler for me – FEST Feb 17 '23 at 21:44

0 Answers0