How to access the "underlying" data(array) of a component
Hi!
If you use a service, and you put the result in a mobilegrid og mobilelist you can get many lines/records when the data comes from a JSON array. Sometimes you might also let the user edit the displayed data so that you can send the modified data back to the database.
I come to think of the stringify function. I know the code here is wrong, but I want to do the similar thing:
var myObject = Tiggr("mobilegrid13").data;
var p = JSON.stringify(myObject); //p could here be a parameter to a service
alert(p); //says of course "not defined"
Better explained: I will let the user edit the data. Then when he/she hits the update button, I want to stringify the value of all the text input components and then send the string to a backend service responsible to post the edited data back to the database.
What is the simplest way of stringify the underlying array? Is this complicated? Do I have to make a loop and iterate through all the lines/records?
Any examples?
best regards
Ole Henrik Oftedal
Timeflex Systemer AS
http://www.timeflex.no
http://www.timeflex.com