I have an entry in Razor View which is
<li data-img-url="@stock["images"][0]["url"]">
@* stock is a JObject which can contain or cannot contain ["images"]*@
Irrespective of location of null occurence, how to get the final string data-img-url=""
. Also how to handle such situations where output of statement is needed without adding extra code blocks such as If/Else
or Try/Catch