Here is my original javascript code
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 - list or 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 there is no mistake.
But here no meaning is obtained.
app.route('/add', methods=['GET'])
def sum():
start = request.form.getlist('hoot[]')
print type(start)
print len(start)
Length 0
source
share