Support > Forums > OpenBots Studio > Extracting data JSON format

Extracting data JSON format

Alfredo Carbajal

  • Reporter
  • Calender Icon November 22,2022 at 6:27 PM

Good day, I'm extracting a data table with an API GET method in a JSON format, what I'm attempting to do is extracting the field's value (name, last name, etc) into a string variable but have not been successful, I parsed the extracted JSON into a List of arrays, desirialize it into a JSONObject and I'm able to reference the values into a "show message" command but I'm stuck trying to make that into a String variable to use later, trying to do it directly gives me the error "Newtonsoft.Json.Link.JValue can''t be converted into a System.String"

This forum has 314 topics, 681 replies, and was last updated 25 days ago by Support Agent

Rushabh Arbat

  • Participant
  • Calender Icon November 25,2022 at 5:43 PM

Hi alfredo.carbajal.nips,

Thank you for sharing your query.

You can convert a deserialize data into string by using following structure vJObjectData.SelectToken("data.first_name").Value() and you can store in String variable to later use. While doing this if you got dependency error then you can add those from Imports tab which is in located below inside the studio which are mentioned below.

Microsoft.CSharp.RuntimeBinder Newtonsoft.Json

You are not authorized to reply, please click here to login and add your reply to this topic.