I have this object and I want to save data in the Obj.document.metadata.name
example: newData = Obj.document.metadata.name
but it didn't work. I will appreciate all answers.
var Obj =
{
"document": {
"metadata": {
"name": "",
"date": "",
"autor": ""
}
}
}
Obj.document.metadata.name="Xerardoo"
temporarily you can save this way. But it will be lost if page refresh
你也可以这样
Obj["document"]["metadata"]["name"] = "Value"
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.