Public
Edited
Jun 22, 2023
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
data = getAllReplies()
Insert cell
result= searchFunction()
.map(v => extractReply(v))
Insert cell
Insert cell
html `
${result}
`
Insert cell
function extractReply(value) {
const extract = value.post
const date = value.published
let output = '<hr>'
output += "<div class='user'>" + value.user + "</div>"
output += '<a href="https://qbn.com/reply/' + value.id + '/" target="_blank" >'
output += date.toUTCString()
output += '</a>'
output += '<h2>' + value.topicTitle + '</h2>'

output += '</p>'
output += extract
output += "<h3>Score: " + value.score + "</h3>"
output += "<h3>Notes</h3>"
output += value.notes.map(v => "<b>"+v.user + "</b>: " + v.comment + " ").join(" | ")
return output
}
Insert cell
import {getAllReplies} from "be1c16dba078b46e"
Insert cell

Purpose-built for displays of data

Observable is your go-to platform for exploring data and creating expressive data visualizations. Use reactive JavaScript notebooks for prototyping and a collaborative canvas for visual data exploration and dashboard creation.
Learn more