js中处理数组 如何在一个大的数组中提取一个小数组

已经有的数组

arry1[
0: "id"
1: "hosp_name"
2: "status"
3: "inner_status"
4: "create_user"
5: "manager_id"
6: "type"
7: "engineers"
8: "evaluate_userlist"
9: "saler_flag"
10: "department"
11: "mgrchg_flag"
12: "manager_idlist"
13: "overload_flag"]

arry2[
actual_deploy_time: "2017-01-01 00:00:00"
aio_qty: "21"
area: "上海市 上海市 宝山区"
area_list: (3) [1, 2, 9, __ob__: Observer]
card4g_qty: "21"
create_user: 710
create_username: "张珊"
depart_num: "21"
department: 1
deploy_engineers: "22,29,30"
engineers: "30,29"
evaluate_userlist: "30#29#710"
execute_userlist: [29, __ob__: Observer]
expect_dev_time: "2017-01-01 00:00:00"
expect_dev_time2: "2017-01-01 00:00:00"
first_flag: 0
fs_aio_type: 1
fs_server_type: 1
hosp_id: 10
hosp_name: "上海市宝山区顾村镇社区卫生服务中心"
id: 911
interface_engineers: "30"
interface_userlist: [30, __ob__: Observer]
manager_id: 10
manager_idlist: "10,27"
manager_name: "舒新"
memo: "21"
mgrchg_flag: 0
old_managerid: 10
overload_flag: 0
pad_qty: "21"
pc_qty: "21"
receiver_addr: "21"
receiver_name: "21"
receiver_tel: "21"
rel_manager: "李苏"
rel_manager_id: 710
route_qty: "21"
saler_flag: "0"
server_qty: "21"
status: 50
tracking_num: "21"
type: 1
view_interface_pre: 1
wechat_group: 1

]

需生成的数组

arry3[
0: id:911
1: hosp_name 上海市宝山区顾村镇社区卫生服务中心
2: status:1
3: inner_status:22
4: create_user:李苏
5: manager_id 12
6: type 1
7: engineers
8: "evaluate_userlist"
9: "saler_flag"
10: "department"
11: "mgrchg_flag"
12: "manager_idlist"
13: "overload_flag"]

等于根据第一个数组的对象名 取第二个数组的对象值

查看全部
qq_26013261
qq_875143287
2019/09/22 02:49
  • javascript
  • 点赞
  • 收藏
  • 回答
    私信
满意答案
查看全部

2个回复