You get this error because you just put the string
"/"
between the two variables. You need to concatenate them:
output[i].count1 + "/" + output[i].total_purchase
If it is still not working, then you probably have not yet appended the element. Use the jQuery
append[
^] or
appendTo[
^] to do that.
Also, you need to remove the semicolon after the
text
method:
ar purchas_probability=$("<label></label>")
.prop("id",i)
.text(output[i].count1"/"output[i].total_purchase)
.css({
width:'40px',
height:'40px'
});