I have been trying to research a way to be able to send nested JSON requests via Ajax back to the server. From my understanding formdata that we mostly use for sending images or files to the server wont work in this scenario, since it seems like FormData does not handle nested objects.
This is the kind of payload I need to send. Any suggestions?
payload = {
'login':{
'key':'some_key'
},
'user':{
'doc':{
'dp':<here will be the image file>,
'date':"some date",
'extra':"extra info"
},
'fingerprint':'some_fingerprint'
}
}