request.post to a php server that requires info of a 2D array
Ive been playing around with the servers of our company for a while, posting data to .php to make my work easier, using python. A recent problem is: this time the .php server requires a 2D array, Iâm not familiar with php at all, but what the server requires really is something like somedata[[âkey1â]] somedata[[âkey2â]] And it seems to me pretty naturally that I should do a [{âkey1â: value1, âkeyâ2: value2}] in my python codes. Thereâs no other way to create a 2D array where the values have keys, in python, right? The problem is when I post the dict-in-list data, the server keeps saying the parameters are wrong. Iâve asked the guy in our tech team why this is happening, but he doesnât know python nor the answer. Iâve also searched âposting to php from pythonâ on stackoverflow, and didnât quite find similar questions. Iâm a bit afraid that this is a far too stupid question that no one bothers to ask, but itâs really weird that since thereâs no other way to represent [[âkey1â=> value1, âkey2â=> value2]] In python than a dictionary in a list. Is there? Any help would be appreciated. I personally think that the tech guy didnât write it correctly on his part, Iâll never know. Ps. Iâm also confused because if I get data from a php server that is a similar 2D array, it simply translates into a dictionary inside a list. In fact, thatâs how I got the list data in the first place: first getting it from one php, then passing it to another. My code: https://code.sololearn.com/c0jj85CH4zoQ/?ref=app