skip to Main Content

Insert JSON Data into already existing SQL Table

I am doing an API call which returns the following JSON as a string: [{ "id": 103000180455, "name": "Personal", "created_at": "2023-06-12T07:12:52Z", "updated_at": "2023-06-12T07:12:52Z", "personal": true, "responses_count": 1 }, { "id": 103000180454, "name": "General", "created_at": "2023-06-12T07:12:52Z", "updated_at": "2023-06-12T07:12:52Z", "personal": false, "responses_count":…

VIEW QUESTION

Javascript – TypeError: "name" is read-only ,when trying to update the value

I use this handleDepartmentChange to change the input value when updating. const handleDepartmentChange = (companyIndex, departmentIndex, e) => { const newCompanies = [...companies]; newCompanies[companyIndex].children[departmentIndex].name = e.target.value; console.log(newCompanies[companyIndex].children[departmentIndex].name); setCompanies(newCompanies); }; For that I use the following way <div style={{ display: "flex"…

VIEW QUESTION
Back To Top
Search