Skip to content
Discussion options

You must be logged in to vote

I ended up writing a backend script to parse the json and create notes as needed. I created a child note with the json file and imported it like this:

`
const dataNote = api.currentNote.children[0];
const json = dataNote.getJsonContent();

json.entries.forEach(function parseEvents(item, eventIndex) {
//get the parent note for this entry
const entryDate=item.date.year +'-' + item.date.month +'-'+item.date.day;
const parentNoteId = api.getDateNote(entryDate).noteId;
item.images.forEach(function parseImages(image, imageIndex, images) {
const title= item.headline;
const note = api.createTextNote(parentNoteId, title, image.desc).note;
note.toggleRelation(false, "runOnAttributeChange");
note.tog…

Replies: 3 comments

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by jobidon
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants