我想获取文件列表顶部的文件夹列表(文件夹和文件列表必须按字母顺序排序).
我有启动树的功能:
$('#jstree_demo_div').jstree({
'core' : {
'data' : [
{"id":"index_0","text":"test_folder","parent":"#","icon":""},{"id":"index_1","text":"vide","parent":"index_0",{"id":"index_2","text":"05nesf-sdfdgd.mp4","parent":"index_1","icon":"fa fa-film"},{"id":"index_3","text":"naissance-d-une-fleur-ouwzp9me-41.mp4",{"id":"index_4","text":"za05nesfsdfsdg.mp4",{"id":"index_5","text":"ddd",{"id":"index_6","text":"05nes-ibw6q9me-41.mp4","parent":"index_5",{"id":"index_7","text":"tom-jerry-soundscape-ttar8gme-41.mp4",{"id":"index_8","text":"aaes-qmc8q-9me-41.mp4",{"id":"index_9","text":"bb05nes.mp4","icon":"fa fa-film"}
]
},'plugins' : ['sort','types'],'sort' : function(a,b) {
//What is the function of sorting
},});
我需要使用哪种排序功能?
最佳答案