title: Calculate inside map in es6
body: <p>I need to calculate the total for a specific field inside map</p>
  
  <pre><code> {agent.reviews.map((a, i) =&gt; {
         return (
            &lt;p style={{fontSize: 15}} key={a.id}&gt;Knowledge Rating: 
                   {a.local_knowledge_rating}&lt;/p&gt;
         )
    })}
  </code></pre>
  
  <p>Returns </p>
  
  <pre><code>Knowledge Rating: 1
  
  Knowledge Rating: 2
  </code></pre>
  
  <p>But I need to achieved is to get the total instead </p>
  
  <pre><code> Knowledge Rating: 3
  </code></pre>
  
  <p>Any ideas? </p>
  
  <pre><code>       "users": [
          {
            "name": "someee",
             "reviews": [
             {
                "id": 1,
  
                "local_knowledge_rating": 1,
              },
              {
                 "id": 2,
  
                  "local_knowledge_rating": 2,
               }
           ],
           }
          ]
  </code></pre>