Skip to content

msv2017/inner-join

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 

Repository files navigation

inner-join

inner-join is a node.js module that simply join arrays of objects by defined key property

Installation

npm install inner-join

Usage

Following code shows how to use it:

var innerjoin = require("inner-join");

var arr1=[
	{id:1, name:'Sam'},
	{id:2, name:'Bob'}];
	
var arr2=[
	{id:1, age:25},
	{id:2, age:30}];
	
	
var arr3=[
	{id:1, height:175},
	{id:2, height:180}];

var r = innerjoin(arr1, arr2, arr3, x => x.id);
console.log(r);

Result:

[ { id: '1', name: 'Sam', age: 25, height: 175 },
  { id: '2', name: 'Bob', age: 30, height: 180 } ]

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published