Method order documentation

Sorts an array of objects based on the given property.

Example

```javascript bbn.fn.order([ {movie: "Brazil", year: 1985}, {movie: "Donnie Darko", year: 2001}, {movie: "Barry Lindon", year: 1976} ], 'year', 'DESC') // [ // {movie: "Donnie Darko", year: 2001}, // {movie: "Brazil", year: 1985}, // {movie: "Barry Lindon", year: 1976} // ] ```

Sorts an array of objects based on the given property. - The resulting array is the same object, the order is based on _compareValues function. BBN is a suite of PHP and JS libraries and VueJS components - all open-source! bbn.io, build applications, the quick way

This website uses cookies to ensure you get the best experience on our website.