{"ScriptPreparationCode":"var arr = [\r\n {\r\n loanId: 1077579,\r\n missingDocs: [\r\n { docTypeID: 4, docType: \u0022CEMA\u0022 },\r\n { docTypeID: 14, docType: \u0022Policy\u0022 },\r\n ],\r\n },\r\n {\r\n loanId: 1077579,\r\n missingDocs: [\r\n { docTypeID: 4, docType: \u0022CEMA\u0022 },\r\n { docTypeID: 14, docType: \u0022Policy\u0022 },\r\n ],\r\n },\r\n {\r\n loanId: 1077579,\r\n missingDocs: [\r\n { docTypeID: 4, docType: \u0022CEMA\u0022 },\r\n { docTypeID: 14, docType: \u0022Policy\u0022 },\r\n ],\r\n },\r\n {\r\n loanId: 1077579,\r\n missingDocs: [\r\n { docTypeID: 4, docType: \u0022CEMA\u0022 },\r\n { docTypeID: 14, docType: \u0022Policy\u0022 },\r\n ],\r\n },\r\n {\r\n loanId: 1077579,\r\n missingDocs: [\r\n { docTypeID: 4, docType: \u0022CEMA\u0022 },\r\n { docTypeID: 14, docType: \u0022Policy\u0022 },\r\n ],\r\n },\r\n {\r\n loanId: 1077579,\r\n missingDocs: [\r\n { docTypeID: 4, docType: \u0022CEMA\u0022 },\r\n { docTypeID: 14, docType: \u0022Policy\u0022 },\r\n ],\r\n },\r\n {\r\n loanId: 1077579,\r\n missingDocs: [\r\n { docTypeID: 4, docType: \u0022CEMA\u0022 },\r\n { docTypeID: 14, docType: \u0022Policy\u0022 },\r\n ],\r\n },\r\n {\r\n loanId: 1077579,\r\n missingDocs: [\r\n { docTypeID: 4, docType: \u0022CEMA\u0022 },\r\n { docTypeID: 14, docType: \u0022Policy\u0022 },\r\n ],\r\n },\r\n {\r\n loanId: 1077579,\r\n missingDocs: [\r\n { docTypeID: 4, docType: \u0022CEMA\u0022 },\r\n { docTypeID: 14, docType: \u0022Policy\u0022 },\r\n ],\r\n },\r\n {\r\n loanId: 1077579,\r\n missingDocs: [\r\n { docTypeID: 4, docType: \u0022CEMA\u0022 },\r\n { docTypeID: 14, docType: \u0022Policy\u0022 },\r\n ],\r\n },\r\n {\r\n loanId: 1077579,\r\n missingDocs: [\r\n { docTypeID: 4, docType: \u0022CEMA\u0022 },\r\n { docTypeID: 14, docType: \u0022Policy\u0022 },\r\n ],\r\n },\r\n {\r\n loanId: 1077579,\r\n missingDocs: [\r\n { docTypeID: 4, docType: \u0022CEMA\u0022 },\r\n { docTypeID: 14, docType: \u0022Policy\u0022 },\r\n ],\r\n },\r\n];\r\n","TestCases":[{"Name":"reduce with concat","Code":"arr.reduce((acc, loan) =\u003E acc \u002B loan.missingDocs.length, 0)","IsDeferred":false},{"Name":"flatMap","Code":"arr.flatMap(loan =\u003E loan.missingDocs).length","IsDeferred":false}]}