vue里多维数组的索引值怎么获得 财富值86

2016-10-27 11:09发布

[

            {                 "_id": "578c2f687ec482840b07e4e8",                 "nodes": [                     "XYK0101000002G",                     "XYK0101000007G"                 ],                 "users": [                     {                         "_id": "578c2f2c7ec482840b07e4e7",                         "name": "18951904112",                         "group_id": "578c2f687ec482840b07e4e8",                         "latest_get_message_time": 1477385019,                         "role": "master",                         "info": {                             "phone": "1895112",                             "name": "",                             "address": "江苏",                             "mou_num": 0,                             "pond_num": 0,                             "per_mou_fish": 0,                             "kinds": [                                 "混养"                             ]                         }                     },                     {                         "_id": "57e3531f79dc5d5417b55825",                         "name": "17895001036",                         "group_id": "578c2f687ec482840b07e4e8",                         "role": "helper",                         "info": {                             "phone": "1904112",                             "name": "李",                             "address": "江苏省园区",                             "mou_num": 0,                             "pond_num": 0,                             "per_mou_fish": 0,                             "kinds": [                                 "混养"                             ]                         }                     }                 ]             },             {                 "_id": "578c2f687ec482840b07e4e8",                 "nodes": [                     "XYK0101000002G",                     "XYK0101000007G"                 ],                 "users": [                     {                         "_id": "578c2f2c7ec482840b07e4e7",                         "name": "18951112",                         "group_id": "578c2f687ec482840b07e4e8",                         "latest_get_message_time": 1477385019,                         "role": "master",                         "info": {                             "phone": "18951904112",                             "name": "",                             "address": "",                             "mou_num": 0,                             "pond_num": 0,                             "per_mou_fish": 0,                             "kinds": [                                 "混养"                             ]                         }                     }                 ]             }         ];                  这是数据                  

一个users是一个数据,我想按users的记录数作为序号,怎么实现

6条回答

另外也可以为数组索引指定别名(如果值是对象可以为键指定别名):
这个可以解决父子之间的索引问题,不至于混乱,当然是题外话。

一周热门 更多>