As I mentioned in THIS QUESTION, I have problem when getting the response from the server.
I receive an array of objects with these attributes:
[{
\"
Transform the response to string
, then apply a repalce with a regex to convert Id
field to string type:
const axios = require('axios');
axios.get(url, { transformResponse: [data => data] }).then(response => {
let parsed = JSON.parse(response.data.replace(/"Id":(\d+),/g, '"Id":"$1",'));
console.log(parsed);
});