Divide JSON into different parts

Hi everyone,

I need a little help solving an issue related to the division of a large json into different parts.
Let’s say I have the following JSON:
{
“sedPackage”: “SectorComponents”,
“sedGVer”: “4”,
“sedVer”: “2”,
“LocalCaseNumbers”: {
“LocalCaseNumber”: [
{
“country”: “”,
“caseNumber”: “”,
“Institution”: {
“institutionID”: “”,
“institutionName”: “”
}
}
]
},
“InsuredPerson”: {
“PersonIdentification”: {
“familyName”: “”,
“forename”: “”,
“dateBirth”: “”,
“sex”: {
“value”: [
“”
]
}
}
}
How can I divide the JSON above into the following three parts:
First Part:
{
“sedPackage”: “SectorComponents/Pensions/P5000”,
“sedGVer”: “4”,
“sedVer”: “2”,
“LocalCaseNumbers”: {

Second Part:
“LocalCaseNumber”: [
{
“country”: “”,
“caseNumber”: “”,
“Institution”: {
“institutionID”: “”,
“institutionName”: “”
}
}
]

Third Part:
},
“InsuredPerson”: {
“PersonIdentification”: {
“familyName”: “”,
“forename”: “”,
“dateBirth”: “”,
“sex”: {
“value”: [
“”
]
}
}
}
Can anyone help me solving this issue?

@Catarina_Fantasia_Valente

Can you please tell on what basis the division is being done?

because as per what I see it is not based on different objects or nested objects also

cheers

Well, right now, the division is not being done, that’s why I need help. I don’t know how to divide the original JSON into the three parts that I showed earlier.

@Catarina_Fantasia_Valente

I understand you need help with that…when you say division you need them as 3 differnt jsons?

if so is it based on keys that you are dividing it?

because you cannot just divide by number of characters and all

cheers

Exactly! I need them as 3 different JSONs. And it needs to be based on keys

@Catarina_Fantasia_Valente

first deserialize whole json using deserialize json activity then

jobj("LocalCaseNumbers").ToString will give second

jobj("InsuredPerson").ToString will give third

new JObject({"sedPackage"=jobj("sedPackage").ToString,"sedGVer"=jobj("sedGVer").ToString,"sedVer"=jobj("sedVer").ToString}) - this for first part

cheers