Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Retrieving items from JSON
#11
I see what you mean. Thank you.

Maybe I am using the wrong approach. As you say I shouldn't make a new dictionary and just search tenants for what I need. The reason I thought it would be easier to make a new dictionary was I may only want the dataRegion 01 in the new one. I thought it would be easier to search within a new dictionary and get all the keys that dataRegion.

Once the API returns the information and I turn it into JSON I just need to take the lines that match a certain key value, maybe Name, or dataRegion and return those.
Reply
#12
(Oct-25-2019, 05:40 PM)bazcurtis Wrote: Once the API returns the information and I turn it into JSON I just need to take the lines that match a certain key value, maybe Name, or dataRegion and return those.
yes, that's right. Also I wouldn't be surprised if the API can return filtered response using different endpoint
If you can't explain it to a six year old, you don't understand it yourself, Albert Einstein
How to Ask Questions The Smart Way: link and another link
Create MCV example
Debug small programs

Reply
#13
Thanks for the help, buran. I really appreciate. I decided to take a step back and make my own dictionary within a list and work on that. That has helped me.
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  KeyError while retrieving ESPN data john317ab 2 806 Nov-29-2023, 09:07 PM
Last Post: john317ab
  .get() not retrieving value? Sedos101 2 560 Aug-25-2023, 11:48 AM
Last Post: deanhystad
  [Solved] Retrieving a pdf from sqlite3 BigMan 4 2,312 Mar-12-2022, 01:56 PM
Last Post: deanhystad
  Retrieving a column from a data set using a function Bayle 6 2,328 Oct-06-2021, 08:52 PM
Last Post: Bayle
  Retrieving Cookies whois1230 2 2,168 Nov-21-2020, 12:01 PM
Last Post: snippsat
  Problem: Retrieving Form data PythonDev 3 3,083 Oct-16-2020, 02:09 AM
Last Post: PythonDev
  Retrieving dictionary keys within with another dictionay bazcurtis 8 2,811 Oct-29-2019, 10:06 PM
Last Post: bazcurtis
  Trouble retrieving dictionary from mysql.connector cursor swechsler 2 3,046 Sep-17-2019, 05:21 PM
Last Post: swechsler
  retrieving pvalue from statsmodels results Staph 4 3,016 Jul-18-2019, 03:27 PM
Last Post: Gribouillis
  PRAW and PyQt: Immense slowdown when retrieving Reddit posts and adding them to GUI codebro 2 3,215 Dec-30-2018, 01:19 AM
Last Post: codebro

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020