data saved in array of objects and jquery rewritten