Say I get this line of JSON
[{u'status': u'active', u'due_date': None, u'group': u'later', u'task_id': 73286}]
How can I convert those separate values to strings? So I can say
Print Status
And it returns
active
First of all, that ain't JSON as was already pointed out - it's python already. I think you want the keys of the dict automatically transform into local variables. This would be a really bad idea, although in theory, it's possible using
Some problems:
Also, as stated in the python docs, locals () should not be modified. In short: do it like this:
|
|||
|
|
|||||
|