I have a JSON object what I want to be parsed with pug. For example, the object looks like this:
{
"name": "testname",
"type": "news",
"meta": {
"author" : "authorname",
"time": "2017-08-23T06:37:43.505Z"
},
"content": "lorum ipsum...."
}
I can use the data with is directly in the object like name and type with the default code: #{news.name}
. But the data in meta not. #{news.meta.author}
is not working because
Cannot read property 'author' of undefined
How can I acces that data?