JSON 변환 응답 에러 - NestJS
아래는 작성한 코드이다. for (let i = 0; i < reserve.length; i++) { reserve[i]['requestProduct'] = []; for (let j = 0; j < requestItems.length; j++) { if (requestItems[j].reserveId === reserve[i].id) { console.log("push requestProduct item : ", reserve[i]); reserve[i]['requestProduct'].push(reserve[i]); } } } [Nest] 713 - 07/25/2024, 9:37:19 AM ERROR [ExceptionsHandler] Converting circular structure to JSON --> starting at object with constructor 'BusinessRequestReserveEntity' | property 'requestProduct' -> object with constructor 'Array' --- index 0 closes the circle 해당 오류( Converting circular structure to JSON )는 객체 내에 순환 참조(circular reference)가 있을 때 JSON으로 변환하려고 하면 발생합니다. NestJS에서 이런 문제가 발생하는 주된 이유는 ...