I need a function that converts:
"/home/username/Documentos/app.txt"
for an object:
{
"home": {
"username":{
"Documentos":
"app.txt":{}
}
}
}
'
I was thinking of breaking the string by "/", but I did not find a way to put the indexes inside one another.