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 Exchange
🌐
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 - 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}}...
Discussions

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
🌐 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
🌐 r/salesforce
7
4
September 23, 2020
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
🌐 salesforce.stackexchange.com
August 14, 2017
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
🌐 stackoverflow.com
People also ask

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
🌐
MicroPyramid
micropyramid.com › home › blog › salesforce › apex map methods in salesforce: a complete guide
Apex Map Methods in Salesforce: A Complete Guide | MicroPyramid
June 10, 2026 - Map<String, Integer> stock = new ... over or pass to DML. One of the most useful Apex idioms is to pass a SOQL query straight into a Map<Id, SObject> constructor....
🌐
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 ...
Find elsewhere
🌐
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
🌐
Deepika Khanna
mytutorialrack.com › home › understanding map methods in apex: key concepts and best practices
Understanding Map Methods in Apex: Key Concepts and Best Practices
June 1, 2023 - In Apex, the equals(map2) method is used to compare two Map objects for equality. It returns a boolean value indicating whether the two maps have the same key-value pairs
🌐
C# Corner
c-sharpcorner.com › article › apex-map-in-salesforce
Apex Map In SalesForce
September 19, 2019 - get(key) - using this method, we can get the value to which the key is mapped, or it generates null if the key has no value. ... Finally, the ApexMap.apxc class code is mentioned below.
🌐
S2 Labs
s2-labs.com › home › maps in apex
Maps In Apex | Salesforce Developer Tutorials
August 7, 2025 - Map allows quick retrieval of data without looping through a list. Example: Accessing related records efficiently.
🌐
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.
🌐
Salesforcepoint
salesforcepoint.com › 2020 › 07 › salesforce-apex-map-map-methods-with.html
Salesforce Apex Map & Map methods with Examples | Salesforce Lightning Web Components, Aura Components, Apex Triggers, Apex REST API Integration
example: countryWithCapitalMap.put('India', 'Delhi'); //here India is key & Delhi is corresponding value for key 'India'. containsKey(key): By using this method we can check whether key exist or not in Map.
🌐
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
🌐
Techdicer
techdicer.com › home › use map collection in apex
Use Map Collection In Apex - Techdicer
January 24, 2023 - To add key-value pairs to a Map, you can use the put method. For example, the following code adds a key-value pair to the myMap Map: ... To retrieve the value associated with a key, you can use the get method.