Put XML data into key value pair

Put XML data into key value pair

I have some XML data I am trying to put into a key:value pair in order to use as values in an Autocomplete.  What I'm trying to do is return the selection 'CUSTOMER_NAME' from one textbox and use value 'CUSTOMER_ID' to do another AJAX query and update another textbox.

My XML is returned like this:
  1. <?xml version = '1.0' encoding = 'UTF-8'?>
    <ROWSET>
       <ROW num="1">
          <CUSTOMER_NAME>ACME CONCRETE</CUSTOMER_NAME>
          <CUSTOMER_ID>1065</CUSTOMER_ID>
       </ROW>
    </ROWSET>

I'm trying to put the CUSTOMER_NAME as the label and the CUSTOMER_ID as the value.  I'm just not really sure how to access that in JavaScript.

I can do a FIND for CUSTOMER_NAME but that doesn't return the ID.  Finding ROW makes sense as it returns both values but I'm stuck at that part.  I've tried various things but don't really know how.

I've got something like this going:

$ ( xml ). find ( 'ROW' ). children (). each ( function (){
                        customer . push ({
                            [ this .nodeName]: $ ( this ). text ()
                        });
                    });

I feel like I'm close.  This puts the CUSTOMER_NAME and CUSTOMER_ID into the same object.  I understand why but now how to avoid it.