hi have huge json like below
“friendly”: “16 minutes ago”,
“friendly”: “In 3 hours”,
i need to saperate friendly value which is “in 3 Hours” form json
how can i saperate that?
is completedCycles": this is an array?
PLEASE HELP ME ON SAME.
What you mean split?
if you want to access that then use deserialize json and from output
jobj("completedCycles") will give you the jarray which can be access further like this
jobj("completedCycles")(0) - this gives first element of array
And yes that is a jarray
Hey @Mathkar_kunal ,
You can use deserialize json Activity to convert your input from string to Jobject
Let the output will be JsonObject
Then Put :
I believe “completedCycles” is not an array
Yes Now we can say that its an Array.
But your "friendly " does not belong to that array that array is Null i believe.
Can you share that input file?
full json is very big and i cant share because of security concerns.
Can you help me if that aray is closed then how can i extract that required value?
Ok .Assuming that your input will be in a text file,
1.Use a Read Text File activity
2.Store the output in a string variable Lets say “JsonString”
3. Use “Deserialize Json” Activity to deserialize the json string to Jobject
4.Ouytput of the Deserialze Json activity will be “JsonObject”
5. Then you have to see whether your required output(Friendly) is inside the array or not
6.If its inside the array then you have to retrieve that item using
7. Or if it is not inside the array You can directly write
Note : If the value “friendly” is repeated several times in the same array then you have to change the array index from 0 to 1 2 3 etc
Deserialize JSON - ensure that TypeArgument is set to JObject -out: myJObject
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.