Passing 2 sets of data using JQuery .Ajax?
<p>I have a search box:</p>

<pre><code>&lt;input class="box" name="search" type="text" id="search_input" /&gt;
</code></pre>

<p>And a <code>json_encode</code> array called <code>$findall</code>. Using jQuery <code>$.ajax()</code> I want to be able to pass the array AND the "keyword" from the input via the data field.  The code below has set the keyword from the search_input as the variable dataString</p>

<pre><code>$.ajax({
                type: "GET",
                url: "core/functions/searchdata.php",
                data: dataString,  
        //data:{availableDevicesArray : availableDevices },
                beforeSend: function() {
                    $('input#search_input').addClass('loading');
                },
                success: function(server_response) {
                    $('#searchresultdata').append(server_response);
                    $('span#category_title').html(search_input);
                }
</code></pre>

<p>I can pass either dataString or the array, but not both which I need.  How is it possible to pass them both?</p>

<p>UPDATE:</p>

<p>My PHP to get the array is:</p>

<pre><code>mysql_select_db($database_database_connection, $database_connection);
$query = "SELECT * FROM Device_tbl";
$result=mysql_query($query, $database_connection) or die(mysql_error());
$findall = array ();
while($row = mysql_fetch_array($result)){

    $findall[] = $row;
}
</code></pre>

<p>and I am storing the availbleDevices array like so:</p>

<pre><code>var availableDevices = &lt;? echo json_encode($findall); ?&gt;;
</code></pre>
