node vue xx.push is not a function

 oldData在沒有轉成對象之前 是報 oldData.push is not a function錯誤的 fs.readFileSync同步讀取文件返回值是字符串,雖然打印和對象格式一樣, 需要JSON.parse轉成對象就可以了
相關文章
相關標籤/搜索