Here is my link.
Assuming that The testDataArray is received from somewhere server, the html layout is created according to the testDataArray.
What I need to do is: once user typed in something or not, the testDataArray is needed to be converted to the following object, and send back to the server.
And hoping the printed object should looks like:
{
"Untitled Title 1": "sss",
"Untitled Title 2":"sss"
}
Here is the object, received from the server
$scope.testDataArray =
[{
Question: {
title: { en: "Untitled Title 1"},
description: { en: "Untitled description 1"},
options: {value: {en:""}}
},Selection: "text"
},
{
Question: {
title: { en: "Untitled Title 2"},
description: { en: "Untitled description 2"},
options: {value: {en:""}}
},Selection: 'text'
}];
Could someone help me on that? Thanks a lot!