我有一个外部文件contacts.json。如何将其转换为 javascript 数组?
这是contacts.json内容:
{
"ppl1":{
"Name":"Jhon",
"Surname":"Kenneth",
"mobile":329129293,
"email":"jhon@gmail.com"
},
"ppl2":{
"Name":"Thor",
"Surname":"zvalk",
"mobile":349229293,
"email":"thor@gmail.com"
},
"ppl3":{
"Name":"Mila",
"Surname":"Kvuls",
"mobile":329121293,
"email":"mila@gmail.com"
}
}