User Story
Deserialize the given JSON string and System.debug
each value.
JSON
{
"FirstName": "John",
"LastName": "Smith",
"Phone": "123-456-7890",
"Email": "john.smith@example.com"
}
Solution
StaticResource sr = [select id, body from StaticResource Where Name = 'member'];
String text = sr.body.toString();
Map<String, Object> parsedJson = (Map<String, Object>)JSON.deserializeUntyped(sr.Body.toString());
for (String key : parsedJson.keySet()) {
Object value = parsedJson.get(key);
System.debug(key + ': ' + value);
}
Video
Video does not exists.