File-parser is a tool that converts json/csv files into json string data.
npm installfor installing dependencies.npm startto run server on local.
// Append the file to the FormData object
formData.append("jsonFile", file);
const response = await fetch("http://localhost:9000/api/parser/json", {
method: "POST",
headers: {
"contentType":"multipart/form-data"
},
body: formData,
});
const formData = new FormData();
formData.append("csvFile", file);
const response = await fetch("http://localhost:9000/api/parser/csv", {
method: "POST",
headers: {
"contentType":"multipart/form-data"
},
body: formData,
});