I'm pushing in a JSON structure some data and I have this issue as my structure should look at the next example:
{
"data": {
result: [{},{},{}]
}
}
What I have instead is is the:
result: [{},{},{}]
I need to push this structure as data:result but no clue how to do it.
This is what I did until now:
var parent_uuid = node.parent.data.uuid;
var subject_data = node.data.subject_data;
result = []
var keys = Object.keys(subject_data);
for (var i = 0; i < keys.length; i++) {
result.push({name: keys[i], label: keys[i], value: subject_data[keys[i]], type: "string", edit: false})
}
result.push({name: "enable", label: "enabled", value: true, type: "boolean", edit: true})
_this.selectForm();
_this.displayForm(parent_uuid, result);