Vinny B
Posts: 0
Joined: Fri Aug 22, 2014 2:22 pm

mapping from array to grid

Im try to search a localstorage array then map it to a grid. Member m&m has been extremely helpful but I am stuck trying to display the info into a grid during mapping.

Were do I place the javascript?
How do I tell it to map to a grid?

here is my code

var currecord = localStorage.getItem("fireCalendarArray");
arrayLocal = JSON.parse(currecord);

var searchTerm = "2015";

var searchIn = arrayLocal;

var filtered_result = $.grep(searchIn, function(myobj, i) {
strModel = myobj.Month.trim().toLowerCase(); // Just did a trim + lowercase for case-insensitive comparison
return(strModel.indexOf(searchTerm) -1); // Return if search term exists in the Brand name

});

var out = JSON.stringify(filtered_result).split(",");
var map = Appery("month_grid").txt(out);
return Appery("month_grid").txt(out);

M&M
Posts: 0
Joined: Tue Nov 11, 2014 6:59 am

mapping from array to grid

I have created a simple example for you to test. You can download it from this link.

Do remember not to rename the app while importing as I think it sometimes breaks the App. The name of the App is "lsvAndEchoServiceExample"

Here is the dropbox link: Just create a new project from backup and it should work.

https://www.dropbox.com/s/g8niudlf29v...

There are some comments in there too - to make things more clear

M&M

Return to “Issues”