title: How do I set value of an entry in a nested dictionary in Tcl?
body: <p>In this <a href="http://wiki.tcl.tk/19941" rel="nofollow">dict for</a> example:</p>
  
  <p>How do I change the values of fields forenames, surname, street, city and phone? I tried this way:</p>
  
  <pre><code>dict for {id info} $employeeInfo {
      puts "Employee #[incr i]: $id"
      dict with info {
          puts "   Name: $forenames $surname"
          puts "   Address: $street, $city"
          puts "   Telephone: $phone"
  
          set [dict get $employeeInfo $id phone] 2341
  
          puts "   New Telephone: $phone"
  
      }
  }
  </code></pre>
  
  <p>The phone is set with a new value via:</p>
  
  <pre><code>set [dict get $employeeInfo $id phone] 12345
  </code></pre>
  
  <p>It doesn't work. What's the correct way to do this?</p>