Click here to Skip to main content
15,885,365 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
i want to serialize list of item present in the table . is there any short method in java script or j query to do this .I know about serialize and serialize array in java script/query but they do not fit in my case.



product_name product_price product_quantity
x 20 2
y 22 2
. . .
. . .
. . .
z 21 5
Posted
Updated 25-Aug-15 20:48pm
v2
Comments
xszaboj 26-Aug-15 4:31am    
Well you have to populate the table with some data, why don't you serialize the data? Or do you want to send back modified table?
Arif H Shigri 27-Aug-15 2:41am    
jquery serialize and seiralizearray in only for form data not a table data..

1 solution

Well you can get data from table using jQuery and then serialize them to JSON like this:

http://codepen.io/xszaboj/pen/bVbezz?editors=101[^]

hope it will help
 
Share this answer
 
Comments
Arif H Shigri 31-Aug-15 3:41am    
Thanx @xszaboj

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900