jQuery autocomplete will not loop through XML data

jQuery autocomplete will not loop through XML data

Hi,

I'm struggling to connect my code to the xml file so it will loop through the data, here is my code so far;
  $(document).ready(function() {
 setTimeout(function() { $('#_Q0').autocomplete({ source: function(request, response) { $.ajax({ url: "brands.xml", dataType: "xml", type: "GET", success: function(xml) { var results = []; $(xml).find("brand").each(function() { if (results.indexOf(request.term.toUpperCase()) >= 0) { results.push(results); } }); response(results); } }); }, autoFocus: true, minLength: 3, response: function(event, ui) { if (!ui.content.length) { var noResult = { value: "", label: "No results found" }; ui.content.push(noResult); } } }); var render = $('#_Q0').autocomplete('instance')._renderMenu; $('#_Q0').autocomplete('instance')._renderMenu = function(ul, items) { items.push({ label: 'AUTRE MARQUE', value: 'AUTRE MARQUE', last: true }); render.call(this, ul, items); }; }, 100); });
and a plunk -


If anyone can offer some help/advice it will be much appreciated!

Thanks