public Boolean mapContains(Map<id,Object> searchObj, String searchKey, String searchVal){
	for (ID idKey : searchObj.keyset()) {
		if( searchObj.get(idKey).get(searchKey) == searchVal) {
			System.debug('Match Found'+ searchObj.get(idKey));
			return true;
			System.debug('No Match');

	return false;
downloadDownload PNG downloadDownload JPEG downloadDownload SVG

Tip: You can change the style, width & colours of the snippet with the inspect tool before clicking Download!

Click to optimize width for Twitter