Check if the value in the JSON exists

I have a json like
{
“abc”:“12”,
“name”:“Sebastian”
}

Now I want to know if the “name” exists and is not empty.
And what do you think should I check that with “if” or “try catch” ?

Hi @joey1231 ,

use the Deserialize activity (Deserialize Json) and you can check any element in the JSON or do any operations on it, as needed.

Let me know if it helps.

Constantin

Thanks, but I used that. I only want to know if that “name” exists and is the String “Sebastian” are empty

@joey1231

Try below expression in IF activity.

        String.IsNullOrEmpty(varJson("name").ToString.Trim)

If it is empty then it will go to Then side else Else side.