The reason why you get this ERROR is due to the reason that the order[1] is undefined. In other words, there has been an attempt made somewhere in your code to access a property with a name such as in this example it is the word “push” and however, apart from using the object, the base of the reference is undefined and thus, you will have to look for code that refers “push” and check what it has left of it. It is mentioned below for this case:-
if(parseInt(a[i].daysleft) > 0){ order[1].push(a[i]); }
This will mean that the code expects order[1] to be an array. But, however, not an array; it's undefined, so you get the error. Why is it undefined? It is due to the reason that your code doesn't do anything to make it anything else, based on what's in your question. Now, if you just want to place a[i] in a particular property of the object, then there's no need to call .push() at all:
var order = [], stack = [];
for(var i=0;i<a.length;i++){
if(parseInt(a[i].daysleft) == 0){ order[0] = a[i]; }
if(parseInt(a[i].daysleft) > 0){ order[1] = a[i]; }
if(parseInt(a[i].daysleft) < 0){ order[2] = a[i]; }
}