I am getting some JSON values from the server but I don't know if there will be a particular field or not.I need to validate based on the key .

**One Type Of Response**

[![enter image description here](https://i.stack.imgur.com/lbZQ2.png)](https://i.stack.imgur.com/lbZQ2.png)

**Another Type Of Response**[![enter image description here](https://i.stack.imgur.com/EvGuZ.png)](https://i.stack.imgur.com/EvGuZ.png)

In AysncTask we can use "has" function but in Retrofit i am unable to find a solution . 

Provide me a solution