data.json is not a function reactjs using Fetch API

I have delete function using fetch api but while deleting, I’m getting this error, data.json is not a function This is my code export const deleteLeaveType = async id => { const response = await fetch( `${API_LINK}/route/route/route/${id}`, { method: ‘delete’, headers: { ‘Content-Type’: ‘application/json’, Authorization: `Bearer ${Auth.getToken()}`, }, } ); return getData(response); }; I’m calling…

How to create response JSON to XML C#?

I have a response API in the form of JSON, how can I get an XML response in c# i don’t know the placement of the script to convert JSON to XML public static async Task<List<PointMaster>> ExecuteTest(string query) { string connStrResult = ConfigurationManager.ConnectionStrings[“PostGresConnection”].ConnectionString; NpgsqlConnection connection; NpgsqlCommand command; NpgsqlDataReader reader; List<PointMaster> master = new List<PointMaster>(); connection…

How to compare and delete json object from the json array in java

i have three array of json objects String s1=”[{\”Name\”: \”Nandi\”,\”Type\”: \”AllRounder\”,\”UserType\”: \”internal\”}, {\”Name\”: \”Reva\”,\”Type\”: \”BatsMan\”,\”UserType\”: \”internal\”}, {\”Name\”: \”Praveen\”,\”Type\”: \”Feilder\”,\”UserType\”: \”internal\”}]”; String s2=”[{\”Name\”: \”Rakesh\”,\”Type\”: \”AllRounder\”,\”UserType\”: \”external\”}, {\”Name\”: \”Prajwal\”,\”Type\”: \”BatsMan\”,\”UserType\”: \”external\”},{\”Name\”: \”Gowtham\”,\”Type\”: \”Feilder\”,\”UserType\”: \”external\”}]”; String s3=”[{\”Name\”: \”Rakesh\”,\”Type\”: \”AllRounder\”,\”UserType\”: \”external\”}, {\”Name\”: \”Nandi\”,\”Type\”: \”AllRounder\”,\”UserType\”: \”internal\”}]”; JSONArray internalUsers=new JSONArray(s1); JSONArray externalUsers=new JSONArray(s2); JSONArray ptUsers=new JSONArray(s3); if any JSONObject present in…

Codeigniter update JSON data type column in MySQL

I need the update JSON row in the table. I’m running this SQL but there is no any changes or update in JSON row. UPDATE SCHOLAR_FILES SET FILE_DATA = JSON_SET(FILE_DATA,’$.NAME’,’22222′) WHERE APPLICATION_ID = ’29’ AND JSON_EXTRACT(FILE_DATA, “$.ID”) = “1”“` In Controller $this->db->where(‘APPLICATION_ID’, $this->input->post(‘APPLICATION_ID’)); $this->db->where(‘JSON_EXTRACT(FILE_DATA, “$.ID”) = “‘ . $this->input->post(‘ID’) . ‘”‘); $return = $this->db->update(‘SCHOLAR_FILES’,’JSON_REPLACE(FILE_DATA, “$.NAME”,…

In Java how to get the value of a key from a JSON String / Object

I am using Java. I have a string that I have converted to a JSON Object. I want to extract the value of one of the Keys. At the moment I am using this code: String imageId = myJsonObject.getJSONObject(“meta”) .getJSONObject(“verification”) .getJSONObject(“derivedData”) .getJSONArray(“images”) .getJSONObject(0) .getString(“imageID”); This code works but surely there must be an easier way.…