i have a property like this "data.property" = "16165456".. i try to create a object like this
data {
property : "16"
}
i use split and and loop but not work
this.returnKey(model, this.to['pro1'], this.model[this.to['pro2']])
returnKey(model: any, name: string, value: string) {
let nameParts = name.split("."),
currentObject = model;
for (let i in nameParts) {
let part = nameParts[i]
currentObject[part] = currentObject[part]
this.currentObject = currentObject[part];
}
let part2 = nameParts[1];
currentObject = value;
}
<>button in the question editor.