You need to sign in to do that
Don't have an account?
Victor Nguyen 13
Json data
Hello,
I'm using Webhook to retrieve data from a Form provider. Data is in json format. I would like to map the data to each field of Contact and Opportunity in order to create an Opportunity. I want to map the data to these to Maps
Map<String,String> contactMap = new Map<String,String>();
Map<String,String> opportunityMap = new Map<String,String>();
From there, I already wrote a class to create an Opportunity. All I need is to map the data to that map.
Does anyone know how to do that, I'm new to Apex and Salesforce?
Thank you in advance.
I'm using Webhook to retrieve data from a Form provider. Data is in json format. I would like to map the data to each field of Contact and Opportunity in order to create an Opportunity. I want to map the data to these to Maps
Map<String,String> contactMap = new Map<String,String>();
Map<String,String> opportunityMap = new Map<String,String>();
From there, I already wrote a class to create an Opportunity. All I need is to map the data to that map.
Does anyone know how to do that, I'm new to Apex and Salesforce?
Thank you in advance.
I guess this is exactly what you are looking for. Parsing your json response in a Apex map. )
https://opfocus.com/json-deserialization-techniques-in-salesforce/
https://www.lopau.com/demystifying-json-parsing-in-apex/
https://gist.github.com/superfell/1287653
https://www.nextview.nl/how-to-serialize-an-apex-object/
https://sf9to5.com/2018/05/10/parse-json-apex/
http://herogtech.com/salesforce-rest-callout-parse-json-apex/