I want to change the structure of an object javascript, for example:
I have this structure :
obj = {
"email": "[email protected]",
"societe.name": "xyz"
}
and I want to change it to :
obj = {
"email": "[email protected]",
"societe": {
"name": "xyz"
}
}
thank's for help.
obj[societe] = {};``obj[societe][name] = obj["societe.name"];delete obj["societe.name"];