jquery - How do I increment a variable in javascript? -
this json:
{"0":0,"1":1,"2":2,"3","4":4,"5":5,"7":"ocupat","8":8,"9":9,"10":10,"11":11,"12":12,"13":13,"14":14,"15":15,"16":16,"17":17,"18":18,"19":19,"20":20,"21":21,"22":22,"23":23,"24":24,"25":25}
this js code
function populatelocuriliberedus(id_cursa, data_rezervare) { var data = id_cursa + "-" + data_rezervare; $.get(path + 'rezervaribilete/locuridisponibile/' + data, function(o) { $.each(o, function(i, value) { if(value != "ocupat"){ $('#locuridus').append('<option value="'+ value +'">'+ value +'</option>'); } }); }, 'json'); }
the option show starting 0 25, want show 1 26
thanks help.
replace value
(value+1)
when outputting options.