Javascript use list from model
<p>Can somebody help me
this is my code:</p>

<pre><code>for(var i = 0 ; i &lt; @Model.BegrotingsPosten.Count; i++){
    var percentage = '@Html.Raw(Json.Encode(Model.BegrotingsPosten[i].BelastingsPercentage))';
    var berekening = (valueBelastingen / 100) * percentage;
    var afgerond = (Math.round(berekening * 100) / 100);
    $('.euro').eq(i).text(afgerond);
}
</code></pre>

<p>The <code>@Html.Raw(Json.Encode(Model.BegrotingsPost[i].BelastingsPercentage));</code>
does not work and generates the following error</p>

<blockquote>
  <p>The name i does not exist in the current context`.</p>
</blockquote>

<p>If I use<code>@Html.Raw(Json.Encode(Model.BegrotingsPost[1].BelastingsPercentage));</code> it does work, but I have to loop</p>