How to use jquery to calculate the data in json? – Codes Helper

The

code page is shown as follows (showing the numbers of the last 5 issues):
16
12
13
6
1
requires summation and division of numbers by 5, and the result is displayed on the page, (16 “12” 13 “6” 1) / 5 “9.6 (keep integers only)
effect is as follows:
16
12
13
6
1
result: 9 (you need to output this code, how to do it) the following is the page code:

<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf8" />
<script src="http://code.jquery.com/jquery-latest.js"></script>
</head>
<body>

<div id="okay"></div>
<script type="text/javascript">
$(document).ready(function(){
$.ajax({
url: "http://f.apiplus.net/ssq.json",
dataType: "jsonp",
type: "POST",
timeout: 5000, //5
cache: false, //
jsonp: "callback",
success: function(result){
for (var i=0; i < result.data.length; iPP) {
var blue = parseInt(result.data[i].opencode.substr(18, 2));//
$("-sharpokay").append("<br>");
$("-sharpokay").append(blue);//
}
},
});
});
</script>
</body>
</html>

Read more here: Source link