Python Forum
finding and deleting json object
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
finding and deleting json object
#2
You can use the JSON module to read that into a python object.

At that point, the easiest thing might be to just copy everything in ticker_tape_1 to a new list, but leave out the elements you don't want.

tt1 = mydata["ticker_tape_1"]
mydata["ticker_tape_1"] = [x for x in tt1 if x.get("id") != 1]
ndc85430 likes this post
Reply


Messages In This Thread
finding and deleting json object - by GrahamL - Dec-10-2020, 03:09 PM
RE: finding and deleting json object - by bowlofred - Dec-10-2020, 04:11 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  (OpenCV) Help to improve code for object detection and finding center of it saoko 0 1,219 May-14-2022, 05:34 PM
Last Post: saoko
  Deserialize Complex Json to object using Marshmallow tlopezdh 2 2,148 Dec-09-2021, 06:44 PM
Last Post: tlopezdh
  Object of type set is not JSON serializable enigma619 5 12,330 Dec-19-2019, 03:30 PM
Last Post: enigma619
  Object of type Scoreboard is not JSON serializable lsepolis123 9 9,519 Aug-13-2019, 11:22 AM
Last Post: lsepolis123
  Object type of Node to json bhojendra 4 4,578 Apr-28-2019, 01:36 PM
Last Post: bhojendra
  Object of type 'Status' is not JSON serializable ndakena 1 4,460 May-28-2018, 06:35 AM
Last Post: buran
  Object madness - JSON Notation confusion execsys 4 3,713 May-03-2018, 08:56 AM
Last Post: buran
  want to know the kind of object whether its a python or json object johnkennykumar 5 64,958 Jan-21-2017, 08:47 AM
Last Post: snippsat
  quick question about deleting an object from memory LavaCreeperKing 5 5,863 Nov-12-2016, 04:05 PM
Last Post: LavaCreeperKing

Forum Jump:

User Panel Messages

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