How to Create a dynamic Json and paste it into notepad?

Hi Team,

I have a json format somewhat like this :
{“accessRequests”:[{“accessType”:“XYZ”,“auraEngagementProfiles”:[{“auraEngagementId”:“EX123”}],“teamMembers”:[{“firstName":“Diksha”,“middleName”:"",“lastName”:“Sawant”,“fullName”:“Sawant,Diksha”,“notesEmail”:"diksha.r.sawant@gmail.com,“googleEmail”:"diksha.r.sawant@gmail.com",“country”:“USA”,“role”:“COE Staff”},{“firstName”:“Akansh”,“middleName”:"",“lastName”:“Jha”,“fullName”:“Jha, Akansh",“notesEmail”:"akansh.jha@us.pwc.com,“googleEmail”:"akansh.jha@pwc.com",“country”:“USA”,“role”:“COE Staff”}],“triggeringEvent”:“XYZ”,“requests”:[{“requestNumber”:“XYZ001”,“requestStatus”:“IN PROCESS”,“resourceGroup”:“XYZCOE”,“auraEMWType”:“COE”}],“engagementId”:“XYZ223344”,“engagementName”:“Diksha Engagement”,“engagementBU”:""}]}

Now in this Json , my tags are my variable for eg Firstname, NoteEmail id, etc from above json and they all can be dynamic values whose input im getting from some place else. After getting all the variables value to create this kind of json, im unable to do so in notepad through studio.

Can someone help in here?

Hi @DikshaSK,
Consider the Json as a string, and use Replace() method. Like Replace (“xyz”, value)

Don’t think of JSON in this case, consider it as string and append the variables with the values whatever you are getting and then, try to write it in the notepad, Just using deserialize JSON will give you the json object @DikshaSK

@HareeshMR

Yes i followed this in the end. Thanks though :slight_smile:

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