The snippet shows how to move item to the end of array. In a case where we have an array of objects and we want to move the array item by property value. In this example I am using lodash/underscore to find the index of the object and then move the array item by index.
Source code viewer
// Find the index by property title, that should equal to "Unknown". var unknownKey = _.findIndex(results, ['title', 'Unknown']); // Make sure the key exists. if (unknownKey !== -1) { // Clone the value to the bottom of the array. results.push(results[unknownKey]); // Remove the original key. results.splice(unknownKey, 1); }Programming Language: Javascript