Similar to SQL the .on() is used to perform a comparison from a prior .from(), .join() or .leftJoin().
Parameter Of Strings
The .on() requires at least one parameter. Each parameter is the name of the field to perform an equal join on. When following a .leftJoin() and a match does not exist then the inner collection will contain empty fields of the outer collection.
on( string, string , string, ...)
on(field: string, ...fields: string[]): jinqJs;
Predicate Parameter
When passing in a predicate function then only one parameter can be passed in. The predicate takes two parameters and expects a boolean return, true if a match exists. When following a .leftJoin() and a false is returned then the inner collection will contain empty fields of the outer collection.
on( Function(inner, outer) )
on<I, O>(predicate: (inner: I, outer: O) => boolean): jinqJs;