0.1.4 • Published 6 years ago

@scenid/deep-search v0.1.4

Weekly downloads
1
License
MIT
Repository
bitbucket
Last release
6 years ago

deep-search

What is it?

Search complex nested JavaScript objects

Usage

const data = [
  {
    mog: 'rüüt',
    w0000t: [
      'mog1', { weee: 'blah1' },
      'mog2', { weee: 'blah2' },
      'mog3', { weee: 'blah3' },
      'mog4', { weee: 'blah4' },
      'mog5', { weee: 'blah5' }
    ],
    schnubel: {
      hubbel: 'bubbel',
      wusel: [0, 2, 5, 'llll', 6]
    }
  },
  {
    kease: 'kuchen'
  }
]

const result1 = search(data, 6)
const result2 = search(data, 'll')
const result3 = search(data, ['kuchen_', 'blah3_', 5, 'blah5'])
const result4 = search(data, { keys: ['w0000t', 'weee'], terms: ['blah3'] })
0.1.4

6 years ago

0.1.3

7 years ago

0.1.2

7 years ago

0.1.1

7 years ago

0.1.0

7 years ago