The judgement of traversing the same element in javascript Multi-dimensional Array

first I get an array dynamically, and their name values may be the same or different.
is similar to the following structure. Maybe you get arr, maybe you get arr2.

var arr = [{id:1,name:2},{id:2,name:2},...]; //name
var arr2 = [{id:1,name:2},{id:2,name:223222},....]; //name

what I want to ask is: when I get this array and iterate through its name value, how can I tell if the name value is the same, that is, true; is false? if it is not the same?

Apr.03,2021

!arr.some(function(el, index) {
    return el.name != arr[index-1 < 0 ? 0 : index -1].name
})
MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1b3aa83-2c25c.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1b3aa83-2c25c.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?