let items = { 1: 'One', 2: 'Two', 3: 'Three'}
Object.keys(items).map((key, index) => { items[key] = `${items[key]} is ${key}`})// orfor (key in items) { items[key] = `${items[key]} is ${key}`}console.log(items) // {1: "One is 1", 2: "Two is 2", 3: "Three is 3"}
or create new items (instead if replacing existing ones)
const newItems = Object.keys(items).reduce((result, key) => { result[key] = `${items[key]} is ${key}` return result}, {})
Or use lodash.mapValues.