Passing by reference to function
So I'm making a jQuery function to which I'd like to pass a JSON containing two data from two form elements. I'd like to have the function take the current data in the fields when it works. However, as I don't know what the form elements may be, I can't hard code the selection to the function.
So how can I pass the data by reference? Or how can I pass the appropriate selector data along, in a key/value pair, so I can create the appropriate JSON for the AJAX in the function?