How to access a variable?

Hi.
Question 1.
Can't get the variable using the module y18n for node.
Could you tell me how? What separator should be ("user.name")?
en.json
{"hello": "Hello", "user": {"name": "David"}}
app.js
let y18n = require("y18n");
let str = y18n.__("hello") + "" + y18n.__("user.name");
console.log(str)

console
Expectations: Hello David
Reality: Hello user.name

Question 2. Why y18n method.__ returns a string
en.json
{"house": {"flat": {"room": "kitchen"}}}
app.js
let y18n = require("y18n");
let house = y18n.__("house");
console.log(house); // {flat: {room: "kitchen"}}
console.log(typeof house); // string
console.log(JSON.parse(house)); // Error, Unexpected token h in JSON at position 2

The string to parse should be {'flat': {'room': "kitchen"}}, but it turns out even that.
Configuration lowered. File finds.
June 14th 19 at 20:52
2 answers
June 14th 19 at 20:54
Solution
Perhaps this module supports only one-level dictionary. In this case you have to write the entire path in one key:
{"hello": "Hello", "user.name": "David"}

To convert objects to a dictionary, there are special modules, like this: dataobject-parser
Better look for an alternative - I think I used the option better.
Option, but not convenient.
Interestingly, the library is very popular, but no one had any of these issues.
At least I didn't find. - jackeline.OConner commented on June 14th 19 at 20:57
June 14th 19 at 20:56
Solution
In short, use i18n-2 :)

Find more questions by tags Internationalization and localizationJSONNode.js