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 ExchangeJanBask 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 - Here is the apex method : @AuraEnabled ... here is what I can see in the system debug of lines : {0={FieldName=AccountId, ObjectName=Opportunity, Operator=<, Value=dfg}}...
How to display Map's list value based on 1 key in Apex Salesforce? - Stack Overflow
Hello beautiful people, I have a scenario where I am defining a Map with string key and a list. Now, I want to put values in a list one by one and also display them using the single Key. Example co... More on stackoverflow.com
Using Maps in Apex (beginner)
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. Does anyone have good reference material or examples on when Map is useful/what’s really happening in the background? I feel like I’m really close to fully grasping it, but there’s still something missing where I’m not fully understanding the value... More on reddit.com
apex - How to access values from Map - Salesforce Stack Exchange
I created a map of , following is the query to create map. map ExpenseCampaignMap = new map ([select Id, ... More on salesforce.stackexchange.com
How to check if a Map contains a given value in Apex Salesforce? - Stack Overflow
How can I verify, with apex, if a given value is contained in a Map? More on stackoverflow.com
How do I get all keys or all values from an Apex Map?
Call keySet() to get a Set of every key, and values() to get a List of every value. keySet() is handy for binding into a SOQL IN clause, while values() gives you a list you can iterate or pass straight to DML.
micropyramid.com
micropyramid.com › home › blog › salesforce › apex map methods in salesforce: a complete guide
Apex Map Methods in Salesforce: A Complete Guide | MicroPyramid
What is a Map in Salesforce Apex?
A Map is an Apex collection of unique key/value pairs. Each key maps to exactly one value, keys must be unique, and both keys and values can be any data type — primitives, sObjects, or custom classes. You use it to quickly look up a value by its key.
micropyramid.com
micropyramid.com › home › blog › salesforce › apex map methods in salesforce: a complete guide
Apex Map Methods in Salesforce: A Complete Guide | MicroPyramid
Are Apex Map keys case-sensitive?
Yes. For String keys, 'Account' and 'account' are treated as two separate keys, even though the Apex == operator compares strings case-insensitively. Normalize the case, for example with toLowerCase(), before using strings as keys if you want case-insensitive behavior.
micropyramid.com
micropyramid.com › home › blog › salesforce › apex map methods in salesforce: a complete guide
Apex Map Methods in Salesforce: A Complete Guide | MicroPyramid
Salesforce 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.
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 ... #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 ...
Decodeforce
decodeforce.com › blogs › apex-map-class-methods-and-examples
Salesforce apex map class and methods with practice examples
Maps in Salesforce Apex are collections of key-value pairs. The keys are unique, and each key maps to a specific value. Here's an example of fruit and quantities:
Levelupsalesforce
levelupsalesforce.com › convert-map-to-list
Apex Convert Map To List - LevelUpSalesforce
August 30, 2022 - 1//Running a query to grab some sample accounts for the demonstration 2Map<Id, Account> accountsMap = new Map<Id, Account>([SELECT Id FROM Account LIMIT 100]); 3 4Set<String> accountNames = new Set<String>(); 5 6//Now we loop over the map by using the values() method 7for(Account a : ...
SFDC Kid
sfdckid.com › 2019 › 04 › salesforce-apex-collection-map.html
APEX COLLECTION: Map - SFDC Kid
So let's get started, A Map is a collection of key-value pairs where each unique key maps to a single value. Keys and values can be any data type (primitive type, collections, sObjects, user-defined types, and built-in Apex types). For example: For every Country(key) there is Currency(value) like for Country(key) - Currency(value) United States - Dollar Japan - Yen France - Euro England - Pound India - Rupee
Reddit
reddit.com › r/salesforce › using maps in apex (beginner)
r/salesforce on Reddit: Using Maps in Apex (beginner)
September 23, 2020 - With a Map<Id, SObject> you can simple do a Get statement to return the record with the matching Id. Thinking them as a way to arrange data for easy retrieval later. ... Think of a Map like a dictionary in real life.
S2 Labs
s2-labs.com › home › map initialization methods in apex
Map Initialization Methods In Apex | Salesforce Developer Tutorials
April 27, 2026 - In Salesforce Apex, Maps are collections of key-value pairs, where each unique key maps to a single value. Initializing Maps in Apex can be done in various ways depending on the requirements.
YouTube
youtube.com › shorts › 4OR3UUF-Inw
Retrieve value from a Map in Apex #coding #sfdcstop #salesforcedeveloper #shorts #programming - YouTube
Aloha Trailblazers, Let's learn how can we retrieve a value from a Map in apex using the key
Published: March 12, 2025