Which varibale type could be used for values inside square brackets ["RPA","UIPATH"]

Hi Team,

Values are received to the UiPath in_Arguments from UiPathh Apps like this [“RPA”,“UiPath”] .

Which variable type could hold the above values? I Have tried with String, String Array , JArray.
I am facing below error:

Error ERROR Validation Error Compiler error(s) encountered processing expression “[“RPA-ITS-DeliveryTeam”,“PNPOrganizationteam”]”.(2) : error BC30201: Expression expected.
(2) : error BC30198: ‘)’ expected.
(2) : error BC30203: Identifier expected.
(2) : error BC30037: Character is not valid.

@Palaniyappan @Jobin_Joy

["RPA","UiPath"] is the JSON representation of aString Array

we can parse this Serialized string within a JArray

  • Use Deserialize JSON Array Activity or Code:
Newtonsoft.Json.Linq.JArray.Parse(strJSON)

we can bring it it into a StringArray/StringList by:
grafik

One of many options

you have to escape the inner doublequotes

var1 = "[""RPA"",""UiPath""]" is a string

OR

var1 | JArray = Newtonsoft.Json.Linq.JArray.Parse("[""RPA"",""UiPath""]")

Actually, this value comes from UiPath Apps to the in_Argument in UiPath.
Since it comes with square brackets, I cannot store it in the Argument due to challenges in variable type.

Just read carefully the code snippets

we had shown you on how to handle:

  • The String / JSON String
  • on how manually construct a JSON String handling the inner double quotes

you can prototype it by using the immediate panel
Understanding the 6 Debugging Panels of UiPath in the easiest way possible! - News / Tutorials - UiPath Community Forum

You can, as it is a JSON String | DataType: String