npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2025 – Pkg Stats / Ryan Hefner

wobal-jsonbrowser

v1.0.0-beta.1

Published

## Instructions

Readme

jquery.jsonbrowser.js

Instructions

See demo.html for full instructions.

Create a div. Use the 'jsonbrowser' class for the default styling.

<div id="browser" class="jsonbrowser"></div>

Call the jQuery function.

$('#browser').jsonbrowser('{"instruction": "pass a json string here"}');

Options

$('#browser').jsonbrowser(..., {
    'parseURLs'   : true,    // Whether to parse and link URLs.
    'scheme'      : 'http',  // URLs beginning with // are automatically completed using this value.
    'collapsible' : true,    // Whether the user can collapse/expand nodes. 
    'collapsed'   : false    // Whether the default behavior is collapsed or not. 'collapsible' must be true.
});

Collapsing / Expanding

$.jsonbrowser.collapseAll('#browser');
$.jsonbrowser.expandAll('#browser');

Searching

You can use the search() function to filter the data by either keys or values.

$.jsonbrowser.search('#browser', 'search term');

For the following examples we'll use this data structure:

[
    {
        'title': 'Harold and Maude',
        'runtime': 91,
        'genres': ['Comedy', 'Drama'],
        'release_date': '1971-12-20',
        'director': 'Hal Ashby',
        'writer': 'Colin Higgins',
        'roles': {
            'Maude': 'Ruth Gordon',
            'Harold': 'Bud Cort',
            'Mrs. Chasen': 'Vivian Pickles',
            'Glaucus': 'Cyril Cusack'
        },
        'imdb_url': 'http://www.imdb.com/title/tt0067185/'
    },
    {
        'title': 'Garden State',
        'runtime': 102,
        'genres': ['Comedy', 'Drama', 'Romance'],
        'release_date': '2004-09-22',
        'director': 'Zach Braff',
        'writer': 'Zach Braff',
        'roles': {
            'Andrew Largeman': 'Zach Braff',
            'Gideon Largeman': 'Ian Holm',
            'Sam': 'Natalie Portman',
            'Mark': 'Peter Sarsgaard',
        },
        'imdb_url': 'http://www.imdb.com/title/tt0333766/'
    }
]

Value search

If the search term does not start with a dot, only the values that contain the search term will be shown. The search term an would show the following data structure:

[
    0: {
        title: "Harold and Maude",
        roles: {
            Mrs. Chasen: "Vivian Pickles",
        },
    },
    1: {
        genres: [
            2: "Romance",
        ],
        roles: {
            Gideon Largeman: "Ian Holm",
            Sam: "Natalie Portman",
        },
    }
]

Key search

If the search term starts with a dot, the search will filter the data by matching keys. You can filter nested structures by concatenating multiple keys with a dot, where each dot separates the depth level.

The search term .0.ro.ma would result in ...

[
    0: {
        roles: {
            Maude: "Ruth Gordon",
        },
    }
]

By using the special * character a whole level can be matched. For example .*.ti would resolve to ...

[
    0: {
        title: "Harold and Maude",
        runtime: 91,
    },
    1: {
        title: "Garden State",
        runtime: 102,
    }
]