score:0

Accepted answer

i think this is because you're not specifying any id, but you're just passing {data {fullname: personname}}.

it should be:

api.get('/data.json').then(arr => {
      object.values(arr.data).map( val => {
        if(personname === val.fullname){
          console.log(val.fullname);
          axios.delete("/data.json",{
            data: {id: itemid}
          }).then((response) => {
              console.log(response)
          }).catch((error) => {
              console.log(error)
          })
        }else{
          alert('bir hata oluştu. sayfayı yenileyiniz...')
        }
      })
    })

Related Query

More Query from same tag