title: Getting values from Future instances
body: <p>My data is something like this:</p>
  
  <pre><code>{
    "five": {
      "group": {
        "one": {
          "order": 2
        },
        "six": {
          "order": 1
        }
      },
      "name": "Filbert",
      "skill": "databases"
    },
    "four": {
      "group": {
        "three": {
          "order": 2
        },
        "two": {
          "order": 1
        }
      },
      "name": "Robert",
      "skill": "big data"
    },
    "one": {
      "name": "Bert",
      "skill": "data analysis"
    },
    "seven": {
      "name": "Colbert",
      "skill": "data fudging"
    },
    "six": {
      "name": "Ebert",
      "skill": "data loss"
    },
    "three": {
      "name": "Gilbert",
      "skill": "small data"
    },
    "two": {
      "name": "Albert",
      "skill": "non data"
    }
  }
  </code></pre>
  
  <p>I am using the following function:</p>
  
  <pre><code>  Future retrieve(String id) async {
      Map employeeMap = await employeeById(id); //#1
      if (employeeMap.containsKey("group")) { //#2
        Map groupMap = employeeMap["group"];
        Map groupMapWithDetails = groupMembersWithDetails(groupMap); #3
        // above returns a Mamp with keys as expected but values 
        // are Future instances.
        // To extract values, the following function is
        // used with forEach on the map
        futureToVal(key, value) async { // #4
          groupMapWithDetails[key] = await value; 
        }
        groupMapWithDetails.forEach(futureToVal); // #4
      }
      return groupMapWithDetails;
     }
  </code></pre>
  
  <ol>
  <li>I access an employee (as a<code>Map</code>) from the database (Firebase)</li>
  <li>If the employee is a leader (has a key "group")</li>
  <li>I get the details of each of the employee in the group filled up from the database by calling a separate function. </li>
  <li>Since the function returns a map with values that are instances of <code>Future</code>, I want to extract the actual values from them. For this a <code>forEach</code> is called on the map.
  However, I only get instances of Future as values. </li>
  </ol>
  
  <p>How can I get the actual values?  </p>