title: need help understanding how to use dictionaries
body: <p>I am a novice with regards to the swift 3 programming language though I am familiar basically with C++.</p>
  
  <p>I am trying to learn to use dictionaries in Swift 3; which I believe are similar to hashes in C++. I have a dictionary with several key:value pairs in it.
  I want to take a certain, single key (which I won't know in advance) and extract from that dictionary the corresponding value.
  I know there will be a single key with that name, although the same value will be associated with keys of different names.
  After extracting that value from the key:value pair of that dictionary then I want to store that single value in a variable as a string.</p>
  
  <p>What type of code could do that?</p>
  
  <p>I found some code that seems it might be helpful but I'm not sure and I'm not sure too how to use that code(how to write it actually) to make it perform as I wish.</p>
  
  <pre><code>    extension Dictionary where Value: Equatable {
  
     func someKeyFor(value: Value) -&gt; Key? {
  
          guard let index = indexOf({ $0.1 == value }) else {
              return nil
          }
  
          return self[index].0
  
      }
  
  } 
  </code></pre>