Cari array dengan filter Regex JavaScript
const array = ["page=4", "sortOrder=asc", "datePosted=all-time", "sortOrder=desc"];
const matches = array.filter(value => /^sortOrder=/.test(value));
// matches = ['sortOrder=asc', 'sortOrder=desc'];
Akmal Arzhang