I've got the following issue: I wrote a search function which results are being saved into an array. As i handle the response of that function with the jquery form plugin, i created an additional array which is filled with all of the arrays created by the search. Then, i want to parse that multi-array to my jQuery script as a JSON object. So far so good, but how do i make the multi-array accessable to the script? (Like multiarray.array1.property)
Here is my code so far:
- [HTML / JS]
<!DOCTYPE html> <html> <body> <div class="edit"> <h2>Editieren</h2> <form id="suchen" method="post"><input type="text" id="search" name="id"> <input type="submit" value="Senden"></form> </div> </html>
$('#suchen').ajaxForm({
url: "./php/search.php",
dataType: 'json',
success: function(data){
alert(data[0]) ;
},
clearForm: true
}) ;
Thank you in advance
Edit:
Example of JSON:
{
"id": "33",
"firma": "sls",
"strasse": "Industriegebiet Siebend",
"plz": "66663",
"ort": "Merzig",
"vorname": "",
"nachname": "Ruf",
"email": "[email protected] ",
"bemerkung": "",
"partner": "",
"kinder": "1",
"nation": "D",
"betreuer": "Adam",
"anrede": "Herr"
}