Hi, I am storing key-value pair in Multimap (I have duplicate keys and values, so I'm using multimap).
I need to iterate every key and corresponding key's value, then return the value if both key and value match the condition. How can I achieve this using multimap?
Example:
Key - Value
a - Red
b - Green
c - Red
a - Blue
From this above key-value pair, I need to return above value for the corresponding key if both key and value match the condition.
I need to do like this,
MyKey = a
MyValue = Blue
if(MyKey==Key && MyValue==Value )
{
// Return map value.
}
What I have tried:
I need to do like this,
MyKey = a
MyValue = Blue
if(MyKey==Key && MyValue==Value )
{
// Return map value.
}