# Iterate over key-value pairs in a Hash

* keys
* iter

* Use the `iter` method to get the iterator
* Though you can iterate over the hash directly. It does the same.

{% embed include file="src/examples/hashes/iterate-over-pairs/src/main.rs" %}
{% embed include file="src/examples/hashes/iterate-over-pairs/out.out" %}


