map()
is the method of Array, but _highlightResult
is the object.
You should use Object.keys()
to iterate the object by key.
Object.keys(item._highlightResult).map(key => {
// Use `item._highlightResult[key]`
})
story_title
is either string
or object
, so you should check it before using Object.keys()
.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…