我对 TypeScript 非常陌生,尤其是对 Object(Sets) 的自定义 Palantir 实现。我要存档的内容:我想将 ObjectSet 过滤为某些特定值。然后我想返回这些值中的第一个。事实上,我只想返回一行。到目前为止我所做的:
@Function()
public nextUnprocessedValueString(inputObject: ObjectSet<CombinedSentencesForTagging>): ObjectSet<CombinedSentencesForTagging>{
const result = Objects.search().combinedSentencesForTagging().filter(f => f.customerFeedback.exactMatch('i like it very much.'))
return result
我只需要第一行(或随机行)。
谢谢!