【发布时间】:2020-07-28 21:59:54
【问题描述】:
我需要将一个公告与一系列其他公告进行比较,并找出哪些是相似的。 如果两个公告的标题和描述中至少有一个相同的词,则它们被认为是相似的。 它们看起来像:
[
{title: "Test", description: "hello", id: 22},
{title: "Test two", description: "hi", id: 49},
{title: "Test three", description: "hello there", id: 100},
{title: "Test four", description: "oh", id: 129},
]
【问题讨论】:
标签: javascript html arrays reactjs