js怎么读取json配置文件的内容

2025-05-14 06:54:44
推荐回答(1个)
回答(1):

test.json:

{
    "name":"hello"
}
import myJson from './test.json';
console.log(myJson.name)