VAR List

Hi. I'm looping thru a table and i'm trying to compile a list that i can send of to an servlet.
How do i create a list as a var that i can add to.
Kind Regards

Comments

  • edited November 2017

    why not to serialize the table?
    var data = table.serialize();
    https://docs.webix.com/api__link__ui.datatable_serialize.html

  • Hi, Thanks. The data in the table is a result of a pivot query. I created a function that on button click will loop thru the table and gather data in a set order. I need to add this data to a var "list" that i can send back to the server.
    var data = {fullname:"", sdate:"", acode:""}
    I need to append or add data to this list. I have the loop and everything setup. Just need to know what is the correct way of adding data to the var data.

  • @zaaimanm serialize will return the actual dataset.
    But if you intend to change some attributes beforehand or decide whether to add item to the "list" array or not, use table.data.each() iterator.

  • Thank you, will try

Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!