Here is a js object that represents the file system in the command line os project I'm working on:
var obj = {
"1": {
"hi": "hi"
},
"2": {
"bye": "bye"
}
};
var currentDir = obj["1"]["hi"];
console.log(currentDir);
When I run this, I get
"hi"
How do I get this to appear as
/1/hi/
I need to get the "file path" of the currently select object.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…