How to correct this kind of problem?

How to correct the problem of

The body of a for-in should be wrapped in an if statement to filter unwanted properties from the prototype eslint reporting error? The
code says

 for ( x in myemrList) {
          arr.push(myemrList[x].hospital_id);
        }
Apr.15,2021

 for ( x of myemrList) {
    
       arr.push(myemrList[x].hospital_id);
 
          
}

if myemrList is an object

for ( x in myemrList) {
      if(myemrList.hasOwnProperty(x)) {
          arr.push(myemrList[x].hospital_id);
      }
}

if it's an array, use for.of

.
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-1e51c52-45162.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-1e51c52-45162.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?