Skip to content

Commit 2ace4f7

Browse files
authored
Update README.md
1 parent 4652c0c commit 2ace4f7

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed

README.md

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,21 @@
11
# json_value_finder
22
a simple script help you find certain value in a json data structure. It will give you the path to the key.
3+
4+
## Example
5+
```py
6+
data = {
7+
"key1": "value1",
8+
"key2": {
9+
"key3": "value3",
10+
"key4": "value4"
11+
},
12+
"key5": [
13+
"value5",
14+
"value6",
15+
{"key6": "value7"}
16+
]
17+
}
18+
19+
result_path = find_path(data, "value7")
20+
print(result_path) # Output: ['key5', 2, 'key6']
21+
```

0 commit comments

Comments
 (0)