parsing failed after axios successfully read the local json file
export function getEmojiData() {
return axios({
method: "get",
url: "/static/emojiDB.json",
responseType:"json",
// transformRequest: [function (data, headers) {
// // Do whatever you want to transform the data
// return JSON.stringify(data);
// }],
})
.then(function(res) {
return Promise.resolve(res.data);
});
}
getEmojiData().then((res)=>{
console.log(typeof res)
console.log(res);
console.log(JSON.parse(res))
})