Skip to content

Instantly share code, notes, and snippets.

@AlexKalinin
AlexKalinin / 01_sort.js
Last active November 17, 2016 07:07
Sort of nested array items (or why sql is better :) )
var obj = JSON.parse('[[{"sort_index":0,"value":0,"title":"index"},{"sort_index":1,"value":"ezxczxcst","title":"tags"},{"sort_index":2,"value":"Rhozxczxcda","title":"name"},{"sort_index":3,"value":"Onezxcczxil","title":"lastName"},{"sort_index":4,"value":"A582978zxczxc6d114cb16e52a8959b","title":"passport"},{"sort_index":5,"value":"373 Kensizxcczx ngton Walk, Independence","title":"adress"}],[{"sort_index":0,"value":0,"title":"index"},{"sort_index":1,"value":"vbbest","title":"tags"},{"sort_index":2,"value":"zx Rhoda","title":"name"},{"sort_index":3,"value":"Oneil","title":"lastName"},{"sort_index":4,"value":"A582zxc9786d114cb16e52a8959b","title":"passport"},{"sort_index":5,"value":"373 Kenzxczxcsington Walk, Independence","title":"adress"}],[{"sort_index":0,"value":0,"title":"index"},{"sort_index":1,"value":"zxc zxcest","title":"tags"},{"sort_index":2,"value":"zxczxcRhoda","title":"name"},{"sort_index":3,"value":"Ozxczxcneil","title":"lastName"},{"sort_index":4,"value":"zxczxcA5829786d114cb16e52a8959b","title