Here is my original code in Javascript
var wt_val = [];
for (i = 0; i<human_wt.length; i++){
var mult;
mult = data_list[basket_list[button_port_name][i]].map(x => x*(wt[i]/100));
wt_val.push(mult);
}
wt_val is a list or a list of lists.
Now I am sending this to the server.
$.ajax({
type: 'GET',
url: '/add',
data: {hoot: wt_val},
success: function(results){
alert("success");
},
error: function(error) {
}
});
Again, no error here.
But no value is received here.
app.route('/add', methods=['GET'])
def sum():
start = request.form.getlist('hoot[]')
print type(start)
print len(start)
Length is 0
hoot, nothoot[].