Via a JSON call I get this JSON Object:
[
{
"feeding_id": 14,
"supp_name": "Test 1",
"supp_weight": 20000,
},
{
"feeding_id": 14,
"supp_name": "Test 2",
"supp_weight": 1000,
},
{
"feeding_id": 12,
"supp_name": "Test 1",
"supp_weight": 4664,
},
{
"feeding_id": 12,
"supp_name": "Test 2",
"supp_weight": 2332,
}
]
What I'm trying to achieve is to create a table like this:
______________________
| 14 | Test 1 | 20000 |
| | Test 2 | 1000 |
|____|________|_______|
| 12 | Test 1 | 4664 |
| | Test 2 | 2332 |
|____|________|_______|
I'm more a PHP guy. So I'm trying to loop the Object and put it in a new Object/ Array (in PHP $array[] = array( ... )). But I can't get it done in Javascript/jQuery.
Can someone help me on the way?