Skip to main content

A tool for analysis json content with some key

Project description

json_tools

A tool for analysis json content

How to use

import json_tools
test_data = {
    'a':{
        'b':{
            'c':'123',
            'd':{
                'c':123,
            },
            'e':[{'a':1}, {'b':2}, {'c':3}],
            'f':[
                {'a':
                    {'c':1}
                },
                {'b':
                    {'c':2}
                }
            ]
        }
    }
}
for ret in json_tools.search(test_data, 'c'):
    print(ret)

result:

['a', 'b', 'c']
['a', 'b', 'd', 'c']
['a', 'b', 'e', 2, 'c']
['a', 'b', 'f', 0, 'a', 'c']
['a', 'b', 'f', 1, 'b', 'c']

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page