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...')
}
})
})
Source: stackoverflow.com
Related Query
- can't delete data with axios from firebase database
- Delete data from API with Axios and ReactJS
- how to save the data from firebase I recently Created with axios and react?
- React with firebase cloud firestore- presenting data from the database
- Firebase with React - unable to delete items from the database
- How to properly store data from Firebase Realtime Database and render it with React once it has been retrieved?
- Getting data from firebase with axios and useEffect
- Get updated data from database with reactjs, axios and php
- Delete all data in mongoDB at once from React with API axios
- How to use map() with data from axios response?
- Redux Store does not update state with created data on firebase real-time database
- Delete file on realtime Database on Firebase with React.js
- Retrieving data sequentially from firebase database using async / await not working
- Reading data from Firebase 3 into a React component with ES6 syntax
- how to fetch data from firebase realtime database in react js
- Problem fetching data from inner join table with axios in react
- Axios with firebase does not return the data while putting it
- How fetch data from firebase realtime database in react js
- React Router Link with params not reloading page with new data from componentDidMount and Redux axios data fetching
- How can I get the right data from database with react
- Getting data from curl but same with axios giving an empty object
- use axios with react to get data from api
- React redux frontend not fetching data from Django API with axios
- React Native + Firebase 9, cant use off() with reference to unsubscribe from onValue changes
- React with Redux Saga - How to get data back from axios call
- Issue with putting data to my database using axios
- Unable to access/manipulate data from weather API using axios with useEffect in React.js
- Can't render a collection of data successfully fetched from firebase with react hook
- Populate React-Table with data from firebase
- setState error on unmounted component when with data from Firebase
More Query from same tag
- Cannot read properties of undefined (reading 'defaultSize')
- I am having problem when adding a working update button inside material ui datagrid v5.6.1
- React-Table: not assignable to type Partial<TableState<object>>
- React ref is only updating one instance
- import svg files inside meteor
- How do pass string into variable using the request api inside my react component?
- React ref using reactstrap Input Module doesn't have Value prop
- Why is an element found using getElementById in Next.js returning null even when document is defined?
- How do I store the state of radio groups in React using react-hook-form
- Mock 'ora' with Jest to see if it was called
- Mapping through state: (TypeError): this.state.[something].map is not a function
- How to add a value to an array inside a React state
- map return undefined array of object?
- How is handleChange receiving props? React
- Html Put a fixed text on an Redux Form Field
- How to mock props that actually are connected action creators of Redux?
- Wrong git branch loaded in node_modules by yarn install command
- How to customise React-Day-Picker input?
- Add className attribute to dangerouslySetInnerHTML contents
- How to change color for the numbers based on its value using javascript and react?
- setting states in react component not class
- Get Label or value of DropdownItem to set text value to DropdownToggle
- Css animated spinner is buggy in IE on Windows 8.1 when used in a React JS component
- React: Is it possible to prevent state update after unmount, via setting this.setState to empty function?
- Params from axios.get request are undefined on the express back end
- Action dispatches successfully, payload reaches the reducer but the state remains the same. React+Redux
- How to get custom headers in react javascript?
- How create separate component for prev/next buttons ReactJS
- React SetState to update An Array and save to Firestore
- How do I apply a margin to a React component without modifying the component itself?