Hi!
I have a sub-sub-sub document that is changing... the old / original version of this field is defined as an object with 3 fields in it:
stepFamily: {
name: {type: String, required: true, default: ""},
description: {type: String, required: true, default: ""},
slug: {type: String, required: true, default: ""},
},
the new version of the field needs to change this to a simple string
stepFamily: {type: String, required: true, default: ""},
after changing my schema definition, i'm trying to write some code that will transform the original data in to the new string... and i'm running in to a problem. I can't get my original object out of the field.
every time I try to .get the field, specifying Object as the type to retrieve:
myObj.get("stepFamily", Object);
it returns the value as '[object Object]' - the .toString() representation of an object literal... it's as if the .get method is ignoring the type parameter, because the field is defined in the schema as a type.
has anyone run in to this problem? know of a workaround for this, so that I can get my original object out of the field?
Thanks,
- Derick