Resort nested array inside object by id