Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Searches arbitrary JSON for a key and returns an array of all matches.
CoffeeScript
Branch: master

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
.gitignore
README.md
jsonselect.coffee

README.md

jsonSelect

Created by Andriy Bazyuta.

Way to find a particular key's value in a JSON

Usage

HTML

data =
  a: "One"
  b:
    d: "Two"
    a: [
      a: "Tree"
    ,
      c: "Four"
     ]

Call

$.jsonSelect(data, "a");

Return

["One", "Tree", [Object { a="Tree"}, Object { c="Four"}]]

Dependencies

CoffeeScript for compilation to .js

Something went wrong with that request. Please try again.