Perfect, Illya!!
Just one more question.
code
"source": "$['count_likes']",
"target_transformation": function(value, element) {
return "<span>" + value + "</span>"
},
"target": "$['mobilegrid_14']['n_likes_html:rawHtml']"
/code
I tried the code above with success but I'd like to use others data together.
How the result of rest service is a list/array of values, I think that I have to get a low level (i). When I tried the code below, the app shows "undefined".
code
"source": "$['count_likes']",
"target_transformation": function(value, element) {
var data = restservice1.response.body;
$.each(this.data, function(index, val) {
return "<span>" + data.count_likes + " " + data.count_comments +"</span>"
});
},
"target": "$['mobilegrid_14']['n_likes_comments_html:rawHtml']"
/code
How can I access one low level of the response.body?
I tried the code below too without success.
code
"source": "$['count_likes']",
"target_transformation": function(value, element) {
var data = restservice1.response.body;
$.each(this.data, function(index, val) {
return "<span>" + data.count_likes + " " + data.count_comments +"</span>"
});
},
"target": "$['mobilegrid_14']['n_likes_comments_html:rawHtml']"
/code
Thanks!