reduce - function with array input → output some value
Array.prototype.reduce()
리듀서 함수는 네 개의 인자를 가집니다. 리듀서 함수의 반환 값은 누산기에 할당되고, 누산기는 순회 중 유지되므로 결국 최종 결과는 하나의 값이 됩니다. 배열의 각 요소에 대해 실행할 함수. 다음 네 가지 인수를 받습니다. accumulator 누산기accmulator는 콜백의 반환값을 누적합니다. 콜백의 이전 반환값 또는, 콜백의 첫 번째 호출이면서 initialValue를 제공한 경우에는 initialValue의 값입니다.
https://developer.mozilla.org/ko/docs/Web/JavaScript/Reference/Global_Objects/Array/Reduce

Filter object properties by key in ES6
If you are OK with using ES6 syntax, I find that the cleanest way to do this, as noted here and here is: const data = { item1: { key: 'sdfd', value:'sdfd' }, item2: { key: 'sdfd', value:'sdfd' }, item3: { key: 'sdfd', value:'sdfd' } }; const { item2, ...newData
https://stackoverflow.com/questions/38750705/filter-object-properties-by-key-in-es6

Seonglae Cho