I have an Angular 2 typescript application that is using lodash for various things.
I have an array of objects that I am ordering using a property in the object...>
This worked for me
orders = [{id : "1", name : "test"}, {id : "1"}]; sortBy = ["id", "name"]; orderby( orders, sortBy.map(s => { return (r: any) => { return r[s] ? r[s] : ""; }; })), );