Created
February 13, 2020 13:29
-
-
Save mgnisia/8c7f8f7333983a994b971bb10c31ad77 to your computer and use it in GitHub Desktop.
Remove files that contain a certain string in a value
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from tinydb import TinyDB, Query | |
db = TinyDB("path/to/your.db.json") | |
q = Query() | |
# the items that should be remove have stringXYZ in field name | |
db.remove(q.name.search('stringXYZ')) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment