Increment number in jQuery
var data = [{"code":"456100010011","incrementingnumber":"015-0011-00001"}];

var code = data[0].code,
    inc = data[0].incrementingnumber;
var inc1 = inc.split('-');
inc1[2] = ('00000' + ++inc1[2]).slice(-5);

document.write(inc1.join('-'));




You don't need the code.slice, but you'd still need to split your incrementingnumber value.