i'm trying to make a web only using couchdb and couchapp...
but for some reason i need external process using python..
and now i'm stuck how to handle post variable in python...
i'v read this(and it works) and this...
but i want it like this :
>>> a = {"success":1,"data":{"var1":1,"var2":2,"var3":3}}
>>> a["data"]["var2"]
2
>>> var2
Traceback (most recent call last):
File "<pyshell#2>", line 1, in <module>
var2
NameError: name 'var2' is not defined
>>> for key, value in a["data"].items():
print (key, value)
('var1', 1)
('var3', 3)
('var2', 2)
>>> var1
Traceback (most recent call last):
File "<pyshell#6>", line 1, in <module>
var1
NameError: name 'var1' is not defined
>>>
i want, when i type var2, it return 2
in other word how to make nested child object become a variable when i don't know how much len
the data.. it's because in external python, how to handle post variable is like this req["form"]["var1"]