json object inside variables?
Closed this issue · 1 comments
fghhfg commented
Can it do this? I tried, but failed.
// model =
{
what: 'hello!',
title: 'sdfsdd',
menu: {
one: 'about',
two: 'company'
}
}
<div>@model.menu.one</div> <!-- Is this work? -->
<div>@model.menu.two</div> <!-- Is this work? -->
otherwise I have too many variable in same scope.
fghhfg commented
I see...
JSON.parse(fs.readFileSync('src/component/menu.json', 'utf8'))