I have a object that looks like this:
var grocery_list = {
\"Banana\": { category: \"produce\", price: 5.99 },
\"Chocolate\": { category: \"candy\", pric
You can create HTML elements with jQuery: The jQuery.text() method: JSFiddle$('$('div').text('some text') This method is recommended if you putting just text inside the element. It will escape all special characters like '<'. Instead it puts <. This avoiding XSS attacks unlike jQuery.html() method.
You can look Security Considerations at jQuery docs about .html method.// Create a div element with jQuery which will hold all items.
var $tree = $('