1
Fork 0
mirror of https://github.com/RGBCube/JsonWrapper synced 2025-07-27 11:47:45 +00:00

more docs

This commit is contained in:
RGBCube 2022-01-21 15:24:28 +03:00 committed by GitHub
parent 55a196c982
commit 06facd0520
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -128,6 +128,7 @@ Output
123
```
## `db.rem()`
### Normal usage
Code
```python
from db import JSONx
@ -151,3 +152,27 @@ Output
{'test': 123}
{}
```
### Using with `pathmagic` kwarg
Code
```python
from db import JSONx
db = JSONx("db.json")
db.set("test", 123, pathmagic="a+b+c")
data = db.all()
print(data)
db.rem("test", pathmagic="a+b+c")
data = db.all()
print(data)
```
Output
```
{'a': {'b': {'c': {'test': 123}}}}
{'a': {'b': {'c': {}}}}
```