How to change the background image for local weather app?

I am aware of the asynchronous calling of the getJSON image and I a able to display an image at the background.The problem I am facing is that when I write my if-else ladder what condition must be present in the if statement.
For example if I want to check if the weather is cloudy then there would be so many different variants of cloudy weather such as:overcast,partially cloudy etc…
I donno how to include all these conditions in the if statement.
I am using Dark Sky API if it helps

If you’re using Dark Sky one of the properties it returns will be ‘icon’. It may be tempting to use ‘summary’ but don’t. Summary has hundreds of potential responses. Icon only has a few. Then you can either use a set of if/else statements to set the background depending on the icon property, or you can use a switch statement.

Here is the description of the different icons from the Dark Sky response format page:

icon optional
A machine-readable text summary of this data point, suitable for selecting an icon for display. If defined, this property will have one of the following values: clear-day, clear-night, rain, snow, sleet, wind, fog, cloudy, partly-cloudy-day, or partly-cloudy-night. (Developers should ensure that a sensible default is defined, as additional values, such as hail, thunderstorm, or tornado, may be defined in the future.)

The response formats page is here if you want to read more: https://darksky.net/dev/docs/response

I hope this helps.
Ali

Thank you Aldek.It helped a lot

Also worth noting that using a switch would be better than chaining if/else statements