title: for-in using dart Exception: type '_InternalLinkedHashMap<String, dynamic>
body: <p>i am not familiar using For-in using dart, i use similar code in ts or angular and it work as expected, but get lost when use flutter and need more guidance to use it.</p>
  
  <pre><code> Future&lt;int&gt; datetransaction(String mid) async {
     var url = 'http://callsomehttp.com/$mid';
      var res = await http.get(url);
      if (res.statusCode == 200) {
          var dtpoint = json.decode(res.body);
          var availabledate = [];
          for (var key in dtpoint) {
               var dateEle = dtpoint[key]['Balance']['date'];
               if (availabledate.indexOf(dateEle) == -1) {
                   availabledate.add(dateEle);
                   totalSpending(dateEle, mid);
               }
          }
          print('available data $availabledate');
          var spen = totalTransaction.reduce((a, b) =&gt; a + b);
         return spen ; 
       } else {
        throw Exception(
            "Request to $url failed with status ${res.statusCode}: ${res.body}");
      }
    }
  
  
  
  
  Future totalSpending (String date, String ckey) async {
      var total  = 0 ;    
      final String url = 'http://otherurl.com/$date';
      final res = await http.get(url);
      if (res.statusCode == 200) {
          var pdata = json.decode(res.body);
          for (var key in pdata) {
              var el = pdata[key]['Transaction']['customer_code'];
              var ttl = int.parse(pdata[key]['Transaction']['total']);
              if( el == ckey) {
                totalTransaction.add(ttl);
                total = ttl ;
              }
          }
          return  total ;
      }  else {
        throw Exception(
            "Request to $url failed with status ${res.statusCode}: ${res.body}");
      }
    }
  </code></pre>
  
  <p>any guidance to give a light , or other way to get the result  really appreciate, thank  you </p>