« first day (1172 days earlier)      last day (2945 days later) » 

1:15 AM
var lastrem;
function stopText() {
var element = document.getElementById("top");
while (element.firstChild) {
lastrem=element.firstChild.cloneNode(true);
element.removeChild(element.firstChild);
}
}
 
1 message moved from JavaScript
 
 
4 hours later…
5:22 AM
I have this Json
```
all_subjects: [
{
id: 1,
subject_code: "COMP101",
description: "Knowledge Work Software & Presentation ",
name: "",
grade: [
{
id: 103,
subject_id: "1",
user_id: "17",
grade: "F",
reviewed: "0"
},
{
id: 104,
subject_id: "1",
user_id: "16",
grade: "F",
reviewed: "0"
}
]
},
```

how do I count the that is F.
I'm trying this @{{ all_subjects.grade.grade->count() }} it doesn't work
 
1 message moved from JavaScript
 
 
4 hours later…
9:52 AM
Dear @AwalGarg I was able to create a HTML table like this: I added the data inside a JSON object and then just:
'
var price_rows = [];
$.each(JSON_ems_pricelist, function(k, v) {
var row = "<tr><td>~ "+k+"g</td><td>"+v+"円</td></tr>";
price_rows.push(row);
});
$("#ems_price_list tbody").html(price_rows);
'
 
1 message moved from JavaScript
 
 
1 hour later…
11:10 AM
var weight_cost = 0;
for (i = 0; i < weights.length; ++i) {
$.each(JSON_ems_pricelist, function(k, v) {
if(weight<k){
weight_cost = weight_cost+v;
return false;
}
});
}
return weight_cost;
 
1 message moved from JavaScript
 

« first day (1172 days earlier)      last day (2945 days later) »