+ Start a Discussion
Victor Nguyen 13Victor Nguyen 13 

Json data

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.
Kaustubh LabheKaustubh Labhe
Hey, have a read here. https://salesforce.stackexchange.com/questions/27165/how-do-i-parse-a-json-map-into-an-apex-map 
I guess this is exactly what you are looking for. Parsing your json response in a Apex map. )
Raj VakatiRaj Vakati
Refer this link