https://github.com/jingshing-python/json_value_finder
a simple script help you find certain value in a json data structure. It will give you the path to the key.
https://github.com/jingshing-python/json_value_finder
Last synced: 6 months ago
JSON representation
a simple script help you find certain value in a json data structure. It will give you the path to the key.
- Host: GitHub
- URL: https://github.com/jingshing-python/json_value_finder
- Owner: JingShing-Python
- License: bsd-3-clause
- Created: 2023-12-19T04:46:30.000Z (about 2 years ago)
- Default Branch: main
- Last Pushed: 2023-12-19T05:02:39.000Z (about 2 years ago)
- Last Synced: 2025-03-21T03:14:00.979Z (10 months ago)
- Language: Python
- Size: 5.86 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# json_value_finder
a simple script help you find certain value in a json data structure. It will give you the path to the key.
## Example
```py
data = {
"key1": "value1",
"key2": {
"key3": "value3",
"key4": "value4"
},
"key5": [
"value5",
"value6",
{"key6": "value7"}
]
}
result_path = find_path(data, "value7")
print(result_path) # Output: ['key5', 2, 'key6']
```