Implementation
D

Be concise.

Be useful.

All contributions dictatorially edited by webmasters to match personal tastes.

Please do not paste any copyright violating resource.

Please try to avoid dependencies to third-party libraries and frameworks.

Other implementations
import java.util.Map;
m.containsValue(v)
func containsValue(m map[K]T, v T) bool {
	for _, x := range m {
		if x == v {
			return true
		}
	}
	return false
}
print "Found it!" if exists $m{$v};
use std::collections::BTreeMap;
let does_contain = m.values()
        .find(|&val| *val == v)
        .is_some();
m.containsValue(v);
v in map.values()
uses fgl;
m.IndexOfData(v) >= 0
m.value?(v)
Map.values(m) |> Enum.member?(v)
elem v (elems m)
in_array($v, $m, true);
Object.values (m).indexOf (v) !== -1
!m.values.find(_ == v).isEmpty()
using System.Collections.Generic;
_m.ContainsValue(_v)
#include <iostream>
#include <unordered_map>
int main()
{  
    // simple comparison demo
    std::unordered_map<int,char> example = {{1,'a'},{2,'b'}};

    size_t nElements = example.count(2);
    if (nElements) {
        std::cout << "Found " << nElements << " values." << '\n';
    } else {
        std::cout << "Not found\n";
    }
}