JSON | Django passing python list
- by MMRUser
Hi,
I'm trying to send a Python list in to client side (encoded as JSON), this is the code snippet which I have written:
array_to_js = [vld_id, vld_error, False]
array_to_js[2] = True
jsonValidateReturn = simplejson.dumps(array_to_js)
return HttpResponse(jsonValidateReturn, mimetype='application/json')
So my question is how to access it form client side, can I access it like this:
jsonValidateReturn[0]
or how I assign a name to the returned JSON array in order to access it?