У меня есть простой литерал объекта, который является адресом, как показано здесь
address: {
country: String,
state: String,
city: String,
zip: String,
street: String
}
и внутри объекта, который я передаю с помощью функции рендеринга express.js.
на моей странице шаблона я пытаюсь выполнить цикл внутри этого объекта, как показано ниже:
<% for (var prop in artist.address ) { %>
<%- artist.address[prop] %>
<% } %>
которые выводят данные, но также включают в себя функции ejs, например:
function () { return this.get(path); } function () { return this.get(path); } yafo 09988 jerusalem israel israeli [object Object] undefined undefined undefined undefined undefined undefined undefined undefined undefined undefined undefined undefined undefined undefined [object Object] [object Object] function () { var self = this , hookArgs // arguments eventually passed to the hook - are mutable , lastArg = arguments[arguments.length-1] , pres = this._pres[name] , posts = this._posts[name] , _total = pres.length , _current = -1 , _asyncsLeft = proto[name].numAsyncPres , _next = function () { if (arguments[0] instanceof Error) { return handleError(arguments[0]); } var _args = Array.prototype.slice.call(arguments) , currPre , preArgs; if (_args.length && !(arguments[0] == null && typeof lastArg ===
так как мне нужно повторить мой объект?
address
являетсяmongoose.Schema
, аartist.address
–mongoose.Document
? - person mscdex   schedule 03.08.2015