How to update JSON array object

FileProd.txt (133 Bytes)
FileDev.txt (259 Bytes)

Problem
If key is missing in Prod then and if already there then update based on Dev file details

Hi Techii,

I am doing JSON learning, DEV file i am using to update prod file,

I am running to app code NPQ if NPQ present in prod then update else Add

Add is working in my code
image

But i am confused on else part

we can detect with myJOBject.ContainsKey(“NPQ”)

  • then Set the Property Value / Alter the content
  • As usually we add a property

we recommend to work closely with the docu

https://www.newtonsoft.com/json/help/html/R_Project_Documentation.htm

I did not get , but trying to understand

@shivkumar
Refer this :

@shivkumar,

You can update and add object like this:

Input Json:
image

Assign Activity:
image

Output:
image

If the desired key is missing this will add it. If already there, it will update it’s value.

Thanks,
Ashok :slight_smile: