I have the following javascript array at the client side -
["27", "28", "29", "30"]
I am sending it to server as follows -
$.post(
'/save/mempks/1/',
{'data':elmArry},
function(data){alert(data);});
On the server, I have put a debugger to see how, the data is received, and I see this unusual behaviour -
ipdb> request.POST
<QueryDict: {u'data[]': [u'27', u'28', u'29', u'30']}>
ipdb> request.POST.items()
[(u'data[]', u'30')]
ipdb> request.POST['data[]']
u'30'
All I want to do is extract, the numbers 27 to 30 and save it in a list.
Where are the numbers 27, 28, 29, and 30 are getting lost?
Could anyone suggest, why this behavior?