我有以下数组:
var phyList = [
{
"firstName": "Michael",
"lastName": "Abbey-Mensah",
"status": "Courtesy",
"specialty": "Pediatrics",
"address": "4564454, Brooklyn, NY 11212",
"phone": "718 || 718.385.9279"
},
{
"firstName": "Niraj",
"lastName": "Acharya",
"status": "Active",
"specialty": "Medicine",
"address": "4545 Avenue, Jamaica NY 11432",
"phone": "4545.558.2894 || 4545.558.9735"
}
];
如果我想在第一个条目中拥有多个专业怎么办?比方说儿科和外科。
这会起作用吗:
var phyList = [
{
"firstName": "Michael",
"lastName": "Abbey-Mensah",
"status": "Courtesy",
"specialty": ["Pediatrics", "Surgery"],
"address": "454545ergaston Blvd, Brooklyn, NY 11212",
"phone": "745458.485.2704 || 516.385.9279"
},
{
"firstName": "Niraj",
"lastName": "Acharya",
"status": "Active",
"specialty": "Medicine",
"address": "45459th Avenue, Jamaica NY 11432",
"phone": "718.558.2894 || 718.558.9735"
}
];