Slice js objects.