Python Forum
Get JSON Value based on Another value
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Get JSON Value based on Another value
#3
Thumbs Up 
(Jan-14-2021, 04:50 PM)buran Wrote:
for trade in data['trades']:
    print(f"{trade['stockSymbol']}: {trade['bid']}")
where data is JSON object, i.e. after you load the JSON string


Thank you - I'll try this out (I'm sure it will work) - I got by using the jmespath library -
Reply


Messages In This Thread
RE: Get JSON Value based on Another value - by sambanerjee - Jan-15-2021, 12:54 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Python Split json into separate json based on node value CzarR 1 5,685 Jul-08-2022, 07:55 PM
Last Post: Larz60+

Forum Jump:

User Panel Messages

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