Hi! I'm working in a python script that read some fields from all cards from a pipe and them write it to pandas in Python. The main idea is to iterate through all key values from json list.
Here's my code:
import requests
import jsonurl = ""https://api.pipefy.com/graphql""payload = ""{\""query\"":\""{ allCards (pipeId:127682, first:50) { edges { node { id title fields { name report_value updated_at value } } } }} \""}""
headers = {
'authorization': ""Bearer ""my_token"""",
'content-type': ""application/json""
}response = requests.request(""POST"", url, data=payload, headers=headers)
print(response.text)Since here, all it's ok.But when I try to parse it with json with this code:json_dic=json.loads(response.text)for key in json_dic:
print (key,"":"",json_dic[key])I just got an another list like the first ""print"", it seems that ""response.text""
is not a dict object, so when I parse it with json.loads, script can't identify the keys and separate them.Whats going wrong?Thx!