You can use JSON.stringify to convert object into a string, parse this
string to get name of properties, and then sort/update like this :

var obj = {a:1, c:3, b:2} ;
var str = JSON.stringify(obj); //'{"a":1, "c":3, "b":2}';
var temp1 = temp2 =  [], temp3 = str.split(', ');
for(var i = 0; i<temp3.length; i++){
        temp2 = temp3[i].split(':');
        temp1.push(temp2[0]);
}

after for, temp1 is array contain the entire name of the properties
that we need.

-- 
To view archived discussions from the original JSMentors Mailman list: 
http://www.mail-archive.com/[email protected]/

To search via a non-Google archive, visit here: 
http://www.mail-archive.com/[email protected]/

To unsubscribe from this group, send email to
[email protected]

Reply via email to