Provides a shorthand for sorting arrays of complex objects
Name of property to use, supports dot notation
Reverse the order of the sort
let arr = [{a: {b: 2}}, {a: {b: 3}}, {a: {b: 1}}];arr.sort(sortByProp('a.b')); Copy
let arr = [{a: {b: 2}}, {a: {b: 3}}, {a: {b: 1}}];arr.sort(sortByProp('a.b'));
Provides a shorthand for sorting arrays of complex objects