I'm trying to return some json with wisp, but the field called "item" is dynamic and could be anything and is of type a. How do I pass it as a dynamic type here?
let result = {
let res_items =
json.array(items, fn(tag) {
json.object([
// something like json.dynamic here
#("item", json.string(tag.item)),
#("tag", json.int(tag.tag)),
])
})
Ok(json.to_string_builder(res_items))
}
wisp.json_response(result, 201)