Javascript Create New Object From Existing Array In C