Sort Object Array Javascript Append Element