How extract specific output from Json response

Hello All, we are facing challenges in extracting specific out from Json response in String format.
The given below is sample output response.

From the above output we need to know if content is False or true, is short what is value of content from above response output.
Can someone help us this issue.


Please use deserialize json activity and from
The output use this(assuming output is in variable jobj)



1 Like

Hi @Ripusudan_Sharma

Please take a look at the following structure:

Imports Newtonsoft.Json.Linq

Dim jsonObject As JObject = JObject.Parse(jsonResponse)
Dim contentValue As String = jsonObject("choices")(0)("message")("content").ToString()

If contentValue = "True" Then
    LogMessage("Content is True")
ElseIf contentValue = "False" Then
    LogMessage("Content is False")
    LogMessage("Content is neither True nor False")
End If

Hope this helps,
Best Regards.

1 Like

Kindly note that your sample has a dot at the end
we can handle by:


In case the value is true / false without dot we can do and get back a boolean (second line):

1 Like

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.