Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

jquery elements to json

var data = $('div.item').map(function(){
    return {
        classname: 'item',
        content: $(this).text()
    };
}).get();
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #jquery #elements #json
ADD COMMENT
Topic
Name
4+8 =