Sort Object Array Javascript Append To String C