I’m working with JSON data, and I need to handle a situation where I fetch a value from the JSON, but if that specific data isn’t available, I need to retrieve another value. Here’s an example:
I have this line of code:
ModifiedDate = DeserializeJsonOutputGetConversationID(“data”)(“attributes”)(“modificationHistory”)(“assignedTeamsAt”).ToString
If “assignedTeamsAt” is not available, I want to do this:
ModifiedDate = DeserializeJsonOutputGetConversationID(“data”)(“attributes”)(“ModifiedDate”).ToString
I tried using containsKey but getting the below error