Question: maintain sorting order of object after converting to array

Question

maintain sorting order of object after converting to array

Answers 0
Added at 2016-12-28 07:12
Tags
Question

I am converting an object to array using

 var objRe =[
    {"organization":"Educerus","project":"Educerus 2014","open_tickets":10},
    {"organization":"Educerus","project":"Educerus 2015","open_tickets":3}
 ];
 var arr = Object.keys(objRe).map(function(k) { return objRe[k] });

which showing result as

open_tickets:10
organization:"Educerus"
project:"Educerus 2014"...

It's changing order, so what I want is to maintain the default order. It's necessary because I have to initialize data table using this array.

Answers
Source Show
◀ Wstecz