過濾掉 AWS Textract 函數(shù)返回的數(shù)據(jù)
我提取了 Textract AWS 函數(shù)返回的數(shù)據(jù)。此 Textract 函數(shù)的返回?cái)?shù)據(jù)類型為以下類型:{ "AnalyzeDocumentModelVersion": "string", "Blocks": [ { "BlockType": "string", "ColumnIndex": number, "ColumnSpan": number, "Confidence": number, "EntityTypes": [ "string" ], "Geometry": { "BoundingBox": { "Height": number, "Left": number, "Top": number, "Width": number }, "Polygon": [ { "X": number, "Y": number } ] }, "Id": "string", "Page": number, "Relationships": [ { "Ids": [ "string" ], "Type": "string" } ], "RowIndex": number, "RowSpan": number, "SelectionStatus": "string", "Text": "string" } ], "DocumentMetadata": { "Pages": number }, "JobStatus": "string", "NextToken": "string", "StatusMessage": "string", "Warnings": [ { "ErrorCode": "string", "Pages": [ number ] } ]}我通過以下代碼從這些數(shù)據(jù)中提取了塊:var d = null;...<Some Code Here>...d = data.Blocks;console.log(d);它以 JSON 對(duì)象數(shù)組的形式提供輸出。下面給出了提取文本的示例:[...{ BlockType: 'WORD', Confidence: 99.7286376953125, Text: '2000.00', Geometry: { BoundingBox: [Object], Polygon: [Array] }, Id: '<ID here>', Page: 1 }, ...]我只想提取文本字段并將其視為唯一的輸出。我該如何開始呢?
查看完整描述