How to saperate json

that 1323 value wil change everytime

@Mathkar_kunal ,

In that case , we can try with the reversal condition :

JArray.FromObject(jArr.TakeWhile(Function(x)Not x("testExecKey").toString.Equals("TEST81313-1322")))


JArray.FromObject(jArr.Where(Function(x)Not x("testExecKey").toString.Equals("TEST81313-1322")))

to which variable we need to assign this means what will be the datatype of that variable

any update on same please share

@Mathkar_kunal ,

It can be assigned to a JArray type of variable :

ok this need to assign inside for each?

inside this?

@Mathkar_kunal ,

You would not need a For Each activity, Just an Assign activity as mentioned.

Put a Breakpoint after Deserialize Json Array activity and check in the immediate Panel the Expression as shown in the image provided above. You should be able to get it working the same way.

1 Like

ok tested but giving whole data except 1322 for second
JArray.FromObject(jArr.Where(Function(x)Not x(“testExecKey”).toString.Equals(“TEST81313-1322”)))

@Mathkar_kunal ,

Could you also check and let us know if the other expression works ?

Also, to be precise on what is the Data needed as Output, Could you also prepare the Expected Output ? This way we can match the Outputs we get and confirm.

as i mentioned in my query i need to saperate each textexckey block start with brace and end with brace.
in between for that testkey will be present .
each testexckey may contains 1or more than one testkeys .
so need that whole testexckey flock with each testkey then i need next block for next testexckey


if you are not clear we can conenct on google meet if possible now

@Mathkar_kunal ,

As already mentioned, providing us with the Expected Output data in the format/form it is required, will help us collaborate together and work on it.

As we are not opposed to the one-to-one call, but seems like this could be possible once the expected output is known, we could wait for your input and also continue with the our work.

If really required, we could jump on the call, if nothing else seems to work.

Expected result 1.json (2.1 KB)
Expected result 2.json (1.2 KB)
input json data.json (3.2 KB)

please find attachments.

@Mathkar_kunal ,

Apologies as I could not get the separate term intially in your Query. The concentration was more towards the last line of the query.

Even for the Expected Results provided by you, we could use the Same Expression :

To retrieve results other than 1322 :

jArr1 = JArray.FromObject(jArr.Where(Function(x)Not x("testExecKey").toString.Equals("TEST81313-1322")))

To retrieve results with 1322 :

jArr2 = JArray.FromObject(jArr.Where(Function(x)x("testExecKey").toString.Equals("TEST81313-1322")))

Two variables are used to store the results as you would need it in that fashion.

1 Like

Taking a look at these…

as mentioned mention queries giving about not for mentioned testexc key but provideing previous testexckey block means iether previous or rest of the block

jArr2 = JArray.FromObject(jArr.Where(Function(x)x(“testExecKey”).toString.Equals(“TEST81313-1322”)))

above one retrieving but writing 3 times or more than 3 times why?
i need only one time

worked. just update me how can i remove [ ] from only start and end not in between ones

@Mathkar_kunal ,

Not so sure why it is required it in that manner, but when using Write Text file, use the below Expression for the text :


Do note the above may not conform to a Valid Json.

sure i will try this.
i got expected result i need to do some more formatting on data which i got by using function which you have provided.can you look at below link which i have created.
help me if possible

1 Like

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