How to use the where function from lodash

Find comprehensive JavaScript lodash.where code examples handpicked from public code repositorys.

4923
4924
4925
4926
4927
4928
4929
4930
4931
4932
* var characters = [
*   { 'name': 'barney', 'age': 36, 'pets': ['hoppy'] },
*   { 'name': 'fred',   'age': 40, 'pets': ['baby puss', 'dino'] }
* ];
*
* _.where(characters, { 'age': 36 });
* // => [{ 'name': 'barney', 'age': 36, 'pets': ['hoppy'] }]
*
* _.where(characters, { 'pets': ['dino'] });
* // => [{ 'name': 'fred', 'age': 40, 'pets': ['baby puss', 'dino'] }]
fork icon73
star icon711
watch icon29

+ 3 other calls in file

94
95
96
97
98
99
100
101
102

docs += '### ' + name + '\n\n';
docs += 'https://raw.githubusercontent.com/lodash/lodash/es6/' + method.name + '.js\n\n';
docs += comments.description.split('\n').join('\n\n');

params = _.where(comments.tags, {tag: 'param'});

if (params.length) {
    docs += '\n\n#### Parameters\n\n';
fork icon38
star icon225
watch icon4

+ 5 other calls in file

Other functions in lodash

Sorted by popularity

function icon

lodash.get is the most popular function in lodash (7670 examples)