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.
@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
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.