id is a property of an JObject, which is value of the data property
Give a try at:
Jobj("data")("id").Value(Of String)
Or
Jobj.SelectToken($..id).ToString
For Rnd/Prototyping the JPath also have a look here:
In this the character is not allowed…
If possible share the JSON as text file with us
You can try : Jobj(“data”)(“id”).ToString
Please ensure that the Deserialize JSON activity is defining TypeArgument: JObject (e.g. when bouncing back From Web Studio to local UiPath Studio)
Kindly note: we used 2x dot (is similar to // form XPath - relative decscendant)
Lets do it one by one to eliminate some error sources
A Json like
will be displayed / visualized within the immediate panel like
but the doubled "
is about visualisation and is not part of the content
" "" "" "
start the string first " 4x" for the 2Double quotes end the string with " = 6x "
we can access:
We do have more relative id’s so we fail:
As we got 9 ids:
{ “id”, “orderAmount.id”, “trip.id”, “createdByUser.id”, “members[0].id”, “product.id”, “product.productInformation.id”, “product.productInformation.productAmount.id”, “supplierOrganization.id” }
And access the first by:
Kindly note:
Your provided JSON was about:
we do see that the data property value is a Serialized JSON representing a JObject
similar to
In that case we do Deserialize the JSON string again
im not getting .parse function
ensure that the following Namespaces are imported:
OR
use FullQualified Name
OR
Deserialize Jobj(“data”).toString additional with a second Deserialize JSON Activity
Thanks alot
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.