Mongoose: CastError: Cast to embedded failed for value "{ value: 'x' }" at path "items"
you can not using isSelected
in Schema as a field name because isSelected()
internally for checking which paths we need to validate in mongoose,so change filedname to isSelect
or ...