Some convenience methods for Metas

This commit is contained in:
Dan Jones 2024-03-11 16:04:29 -05:00
commit 79fa957d02
4 changed files with 39 additions and 16 deletions

View file

@ -186,7 +186,7 @@ func (e Entry) MarshalJSON() ([]byte, error) {
out := map[string]any{}
out["title"] = e.Title
out["date"] = e.Date.Format(time.RFC3339)
for k, v := range e.Fields.toMap() {
for k, v := range e.Fields.Map() {
out[k] = v
}
return json.Marshal(out)