You may use a Map for this:
public static String manageFilters(Map<String, Object> lines){
System.debug('### lines : ' + lines);
System.debug('### lines.values() : ' + lines.values());
for(String key : lines.keySet()){
System.debug('### lines.get(key) : ' + lines.get(key));
System.debug('### >>> ' + lines.get(key));
Map<Object, Object> test = (Map<Object, Object>)lines.get(key);
System.debug('### test ' + test);
System.debug('### test ' + test.get('ObjectName'));
}
return null;
}
Answer from S.. on Stack ExchangeSalesforce Developers
developer.salesforce.com › docs › atlas.en-us.apexref.meta › apexref › apex_methods_system_map.htm
Map Class | Apex Reference Guide | Salesforce Developers
Contains methods for the Map collection type.
Reddit
reddit.com › r/salesforce › using maps in apex (beginner)
r/salesforce on Reddit: Using Maps in Apex (beginner)
September 23, 2020 - I’ve been learning Apex for a little bit now and have a pretty novice understanding of how it all works, but the concept I’m struggling with the most is using maps instead of lists or sets.
S2 Labs
s2-labs.com › home › map initialization methods in apex
Map Initialization Methods In Apex | Salesforce Developer Tutorials
April 27, 2026 - Below are the different methods to initialize maps in Apex. ... MyCustomObject__c obj1 = new MyCustomObject__c(Name = 'Object1'); MyCustomObject__c obj2 = new MyCustomObject__c(Name = 'Object2'); Map<String, MyCustomObject__c> myMap = new Map<String, MyCustomObject__c>{ 'Key1' => obj1, 'Key2' => obj2 }; ... Map<Id, Account> accountMap = new Map<Id, Account>([SELECT Id, Name FROM Account WHERE Industry = 'Technology']); ... Learn more and get all the answers you need at zero cost.
JanBask Training
janbasktraining.com › community › salesforce › how to get values from a map apex?
How to get values from a map apex? | JanBask Training Community
September 23, 2022 - In Apex, you can get values from a map using the get() method or by directly accessing the map keys.
SFDC Kid
sfdckid.com › 2019 › 04 › salesforce-apex-collection-map.html
APEX COLLECTION: Map - SFDC Kid
Salesforce Apex Collection : Map Salesforce Apex Collection is a collection of key-value pairs where each unique key maps to a single value. salesforce Apex Collection in simple and easy steps starting from basic to advanced concepts with examples including salesforce Overview, salesforce Architecture, salesforce Environment, salesforce Sales, salesforce Service Cloud, salesforce Navigating Setup, salesforce Standard, salesforce Custom Objects, salesforce Master Detail Relationship, salesforce Lookup Relationship, salesforce Schema Builder, salesforce Control Access to the Organization, Contro
YouTube
youtube.com › force fellow
Map in Apex | Apex Fundamentals | Salesforce Developer - YouTube
This video is the part of Apex Fundamentals series, which covers map collection in apex. And in this video we have discussed about map defination and importa...
Published: October 9, 2023
Views: 752
Panther Schools
pantherschools.com › home › salesforce › how to use map collection in salesforce?
How to use Map Collection in Salesforce? » Panther Schools
April 21, 2025 - Map is very powerful while using Apex Code in Salesforce · Map<String, String> countryCurrencies = new Map<String, String>(); List<String> ABC = new List<String>(); #1 - Map<String, Integer> accountMap = new Map<String, Integer>(); accountMap.put('Acme', 10000); accountMap.put('XYZ Corp', 5000); accountMap.put('ABC Company', 7500); // Retrieve the value for a specific key Integer acmeValue = accountMap.get('Acme'); System.debug(acmeValue); // Outputs 10000 #2 - Map<String, Integer> accountMap = new Map<String, Integer>{ 'Acme' => 10000, 'XYZ Corp'=> 500 }; Boolean exists = accountMap.containsKey('Acme'); // exists = True accountMap.keySet(); // Returns the Set<Data Type of the Map Key> accountMap.values(); // Returns the List<Data Type of Map Value> Set<String> accountNameSet = accountMap.keySet(); List<Integer> revenueList = accountMap.values(); #3 - Map<String, Integer> accountMap ·
YouTube
youtube.com › mitch routt
Map in Apex Explained | Salesforce Developer - YouTube
Learn Maps in Apex in 2 Minutes! A Map is a flexible and fundamental data structure that Salesforce Developers use to store sObjects in a way that reduces th...
Published: January 19, 2024
Views: 412
Decodeforce
decodeforce.com › blogs › apex-map-class-methods-and-examples
Salesforce apex map class and methods with practice examples
A map is a data structure in Salesforce that links unique keys to specific values in Apex.
Forceshark
forceshark.com › blog › querying-a-soql-query-directly-into-a-map-in-apex
Querying a SOQL Query Directly into a Map in Apex | Blog
In Apex, you can store SOQL query results directly into a Map by querying the records and using a constructor or loop.