Get the values of posted array in servlet
var schedule = [];
var data = {
'user_id' : '12',
'day_of_week' : 'Monday',
'when' : 'start',
'modified' : 'true'
}
schedule.push(data);
var data = {
'user_id' : '13',
'day_of_week' : 'Tuesday',
'when' : 'end',
'modified' : 'false'
}
schedule.push(data);
// schedule would have two objects in it
I am posting array to servlet using jquery ajax post request as below .
data : {'myData':schedule},
url :"./myController",
Now how can I get array of objects and literate to get all the values?
Each array object has string, long and boolean type values. How can I get
all the values by iterating?
No comments:
Post a Comment