Store array in collection2 :Error Data must be an array


Posts.addField(
[
{
fieldName: ‘data’,
fieldSchema: {
type: [ImageSlider.schema],
optional: true,
publish: true,
control: Upload,
}
}
}])

const ImageSlider = new Mongo.Collection(“ImageSlider”);
ImageSlider.schema = new SimpleSchema({

type:{
type: String,
optional: true
},
url:{
type: Object,
optional: true
},

});
ImageSlider.attachSchema(ImageSlider.schema);

I am string Array of objects in data but i am getting error like data must be an array.