I'm trying to do some stuff with ajax in my web page. But what is my problem here is, I have one array in my json result. I don't know to retrieve the data inside my array in jquery
.
Here is my JSON :
{"res":{"tname":"my template","process":["software requirement analysis","efrwefgwerg","ergerger","ewrgerger","erwgrewgre"]}}
I wan't to get the data inside "process"
And what I tried is:
var app;
$.each(data.res.process,function(i,data){app='<li class="ui-state-default"><span class="ui-icon ui-icon-arrowthick-2-n-s"></span>'+data[i]+'<button aria-hidden="true" data-dismiss="modal" class="proclose close" type="button">×</button></li>';
$('#info .processDet').append(app);});
This code gives single
character from specified index
of that of index
. I mean, If it is data[0]
then it gives s
. And if it is data[1]
then it gives f
.
Please anyone help me to solve this issue.