for the life of me i cant seem to get this done, i have a function that does a parent.getrequest and returns json data. i have been trying many ways i see online to only print the key value i want , no success. i tried to just write to file and cant get it. maybe i need to have another function to write the data? below is my function. i am starting to think i can find someone to write it in js to just write file of the 1 key value wanted and call that from the python script in a function. im perplexed and a novice, super novice. lol tried adding the key value i want in the headers but no deal. many way of writing to file nothing worked.
def xboxstate(): shortString = None headers ={} result = Parent.GetRequest("https://api.warframestat.us/xb1/cetusCycle",headers) data = json.loads(result) if data['status'] == 200: game = data['response'] return game
https://stackoverflow.com/questions/65802106/how-to-take-the-json-response-from-function-and-delete-unwanted-keys-or-only-pri January 20, 2021 at 10:05AM
没有评论:
发表评论