DEV Community

Cover image for Filter array objects using filter & concat
Dezina
Dezina

Posted on • Updated on

Filter array objects using filter & concat

let filterArray1 = result.filter(obj => obj.fieldName === true)
let filterArray2 = result.filter(obj => obj.fieldName != true)

const sortedResult = filterArray1.concat(filterArray2)

Top comments (0)