JAVA how to iterate over values in a map of a map
<p>i have map of map i created with</p>

<p><code>Map&lt;String, Map&lt;String, String&gt;&gt; doubleMap = new HashMap&lt;&gt;();</code></p>

<p>and i try iterating over values of keys in second map.</p>

<p>so it can be like:</p>

<p>Key1 -> KeyA -> value1</p>

<p>|--------> KeyB -> value2</p>

<p>|--------> KeyC ->value3</p>

<p>Key2 -> KeyA -> value2</p>

<p>|--------> KeyB -> value4</p>

<p>|--------> KeyC -> value1</p>

<p>continuing on for long as i want.</p>

<p>i want to check if there is value in map that matches an other string.</p>

<p>so i have <code>mainValue = "value2"</code> and i try loop over all values in <code>doubleMap</code> with value variable called <code>thisValue</code> and increment counter if <code>thisValue.equals(mainValue)</code></p>

<p>i dont know how i get <code>thisValue</code>. i try like this</p>

<p><code>thisValue = doubleMap.get(currentNumKey).keySet().toArray()[counter]</code></p>

<p>but that give me letterKeys.</p>

<p>if i do <code>thisValue = doubleMap.get(currentNumKey).get(currentLetterKey)</code> it give me the right value i want, but i not can iterate over all values</p>

<p>thanks you</p>