Home How to add dynamic key in object? How to add dynamic key in object? Anku August 17, 2023 const r = `workshop.inclusiveService`;const serv = {[r]: { serviceId: 70 }};console.log(serv); Facebook Twitter Whatsapp Newer Older