我致力于在表视图中显示 json 数据并将表视图数据传递给下一个视图控制器。在这里,我想根据名称对我的 json 响应进行排序,然后在表格视图中显示。这是我的 json 数据
"data": [
{
"_id": "597323707c691a6b27c63bcc",
"name": "Adidas",
"file": "http://104.236.67.117:5000/uploads/1500717927565.jpg",
"logo": "http://104.236.67.117:5000/uploads/1500717910702.jpg",
},
{
"_id": "597323707c691a6b27c63bcc",
"name": "Bibo",
"file": "http://104.236.67.117:5000/uploads/1500717927565.jpg",
"logo": "http://104.236.67.117:5000/uploads/1500717910702.jpg",
}, {
"_id": "597323707c691a6b27c63bcc",
"name": "Caprese",
"file": "http://104.236.67.117:5000/uploads/1500717927565.jpg",
"logo": "http://104.236.67.117:5000/uploads/1500717910702.jpg",
}, {
"_id": "597323707c691a6b27c63bcc",
"name": "DK",
"file": "http://104.236.67.117:5000/uploads/1500717927565.jpg",
"logo": "http://104.236.67.117:5000/uploads/1500717910702.jpg",
}
我只能对名称进行排序,但不能对整个对象进行排序。任何人都可以为我解决这个问题吗?这对我很有帮助......在此先感谢......