On the problem of js Array matching

pick out the matching route through the boarding point selected by the user

let  data=[
  {
    name:"a",
    line:[
      {type:"up",place:""},
      {type:"up",place:""},
      {type:"up",place:""},
      {type:"down",place:""},
      {type:"down",place:""}
      ]
  },
  {
    name:"b",
    line:[
      {type:"up",place:""},
      {type:"up",place:""},
      {type:"up",place:""},
      {type:"down",place:""},
      {type:"down",place:""}
      ]
  },
  {
    name:"c",
    line:[
      {type:"up",place:""},
      {type:"down",place:""},
      {type:"down",place:""}
      ]
  },
  ]
let upName=""
let downName=""

data upName  downName 
 

data.forEach(function (item) {
    item.line.forEach(function (val) {
      if(val.type==="up" && val.place===upName){
        
      }
    })
  })

Jun.03,2021

let upName = ''
let downName = ''

data.filter((item) => {
  for (let i in item.line) {
    if (item.line[i].type === 'up' && item.line[i].place === upName) {
      return true
    }
  }
}).filter((item) => {
  for (let i in item.line) {
    if (item.line[i].type === 'down' && item.line[i].place === downName) {
      console.log('' + item.name)
      return true
    }
  }
})

is that okay?

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