How to access a variable?

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

Expectations: Hello David
Reality: Hello

Question 2. Why y18n method.__ returns a string
{"house": {"flat": {"room": "kitchen"}}}
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
Perhaps this module supports only one-level dictionary. In this case you have to write the entire path in one key:
{"hello": "Hello", "": "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
In short, use i18n-2 :)

Find more questions by tags Internationalization and localizationJSONNode.js