How to Check whether a attribute/Key exists in Json response or not ?

Anybody can help with How to check whether a key/attribute exists in Json Response or not.

Use JSON component, it returns a object (which you want) if key is not found. So you can compare it with a equals block.

2 Likes

Can you please show how we can use blocks if the specific attribute is not available in json response.

you might want to try the get text from json object method
https://docs.kodular.io/components/utilities/json/#get-text-from-jsonobject
the default value will be returned, if that name is not available

Taifun

1 Like