Skip to content

Instantly share code, notes, and snippets.

View a-gordoa's full-sized avatar

Anthony Gordoa a-gordoa

View GitHub Profile
@tehnrd
tehnrd / gist:4559623
Last active March 1, 2023 07:27
Getting values out of a JSON list of objects with Apex code.
List<Object> fieldList = (List<Object>)JSON.deserializeUntyped('[{"field":"phone","object":"account"},{"field":"name","object":"account"}]');
for(Object fld : fieldList){
Map<String,Object> data = (Map<String,Object>)fld;
//Magic!
system.debug(data.get('field'));
}