Not a member? Signup now
let options = []; const tag = { id: 0, name: <Your Tag Name>, }; options.push(tag); options.forEach((item, index) => { item.id = index + 1 });