title: How to delete multiple json objects from a big json file
body: <p>Hello every one i tried the following code, work best for deleting an object from the json file</p>
  <pre><code>#!/usr/bin/python
  
  # Load the JSON module and use it to load your JSON file.
  # I'm assuming that the JSON file contains a list of objects.
  import json
  obj  = json.load(open(&quot;pandas.json&quot;))
  
  # Iterate through the objects in the JSON and pop (remove)
  # the obj once we find it.
  for i in range(len(obj)):
      #path = [&quot;000000000036.jpg&quot;,&quot;000000000049.jpg&quot;, &quot;000000000077.jpg&quot;]
      if obj[i][&quot;path&quot;] == &quot;000000000036.jpg&quot;:
          obj.pop(i)
          break
  
  # Output the updated file with pretty JSON
  open(&quot;updated_file.json&quot;, &quot;w&quot;).write(
      json.dumps(obj)
  )
  </code></pre>
  <p>here i have a question what i suppose to do if i want to delete many random json objects from my json file i tried but fail please let me clear on it &quot;help appreciate&quot;.</p>