Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
save json value
#1
Hello,
I have to search a value in a json and store it in a variable.

Its easy but the problem is that the json has a primary 'data' tag before the tag with the value I need.

{"data":[{"name":"UVC G3 Dome"

When I do a:
return GETReturn['name']
I have the following error: KeyError: 'name'

Can you tell me how to look for sub-values please.

Thank you
Reply


Messages In This Thread
save json value - by DavidFernandez - Aug-24-2018, 10:25 AM
RE: save json value - by snippsat - Aug-24-2018, 11:07 AM
RE: save json value - by DavidFernandez - Aug-24-2018, 11:11 AM
RE: save json value - by snippsat - Aug-24-2018, 11:34 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  how to save to multiple locations during save cubangt 1 647 Oct-23-2023, 10:16 PM
Last Post: deanhystad
  How to save json data in a dataframe shantanu97 1 2,227 Apr-15-2021, 02:44 PM
Last Post: klllmmm
  json.dumps save some unicode chars as code, not char buran 1 3,005 Aug-02-2018, 04:02 PM
Last Post: buran

Forum Jump:

User Panel Messages

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