aIsmail
18th November 2015, 16:44
Hi everyone,
How to assign ListModel's data to JsonObj in JS code to be saved to JSON file
I made something like this
ListModel{
id: jsonDataModel;
}
JsonStorage{
//registered type
id: jsonStorage
fileName: "db"
}
function savJSON()
{
var jsonObj = listModel // here's the problem, how this assignment could be made ?
var data = JSON.stringify(jsonObj)
jsonStorage.save(data)
}
How to assign ListModel's data to JsonObj in JS code to be saved to JSON file
I made something like this
ListModel{
id: jsonDataModel;
}
JsonStorage{
//registered type
id: jsonStorage
fileName: "db"
}
function savJSON()
{
var jsonObj = listModel // here's the problem, how this assignment could be made ?
var data = JSON.stringify(jsonObj)
jsonStorage.save(data)
}