How to Parse Json if new field is added to any node

Hi - I need to help to solve below problem. I have a json file as shown below.
Today I am parsing it based on the nodes available in this file which is organization, employee id and employee name. Tomorrow if the same file is coming from client and they have added few more fields in employee section apart from id and name ,let suppose DOB and address. In this situation how the code will identify that new fields has been added to json file.

Please help to solve this problem on how to handle the new fields which is being added to json file.
Attached is the code snap for below json parsing.

{
“organization”: “ABC”,
“employee”:
{
“id”: 343,
“name”: "John
}
}

@navincemk
Unfortunately your Post didnt mentioned the expected Output after retrieval the different json properties.

In General you can Bring dynamics into json parsing with

  • Iterating ober the properties of a JObject with yourJObjectVar.Properties
  • From the looped JProperty with propvar.name, propvar.value the Basic retrieval can be implemented
  • Parsing structures in deeper Level can be initiated with checking the value Type e.g. with prop.value.gettype and Then Custom Handling e.g. a nested JObject (e.g your Case employee) or a JArray…

Give US more Info ob the expected Output and WE can suggest a more individually solution

@ppr jsonNodeTest.zip (25.8 KB)

Hi Peter - I have attached the zip folder of project with .xaml file.

Scenario is to parse the json and write the values in XL sheet. So output will be write the parsed values in XL sheet.

We are getting the file like “node.json” in attached folder. So I wrote the code as per requirement.

It might be the case client will add other fields the json like Employee DOB and Employee address apart from Employee ID and Employee name.

Currently my code can handle only the fields available in JSON but if new fields will be added in future my code will not be able to detect it.

It will be helpfull if you can modify my code in such a way to handle dynamically added fields in json file.

Hello Peter - I have replied on forum with code workflow attachment of existing code I have where I wanT to write the values in XL sheet. I need help in knowing how to handle JSON fields dynamically.

Please have a look on my reply reply on forum and provide you help.

Thanks,
Navin