Skip to content

HuangQiii/get-object-from-object-array

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

get-object-from-object-array

Build Status

Find index by property name of object inside array

Installation

npm install --save get-object-from-object-array

Usage

const findDataInObjectArray = require('get-object-from-object-array');

findDataInObjectArray([{ a: 1, b: 2 }, { a: 10, b: 20 }, { a: 100, b: 200 }], 'a', '10');  // 1
findDataInObjectArray([{ a: 1, b: 2 }, { a: 10, b: 20 }, { a: 100, b: 200 }], 'a', '1000'); // -1

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •