farling42 / obsidian-import-json

Plug-in for Obsidian.md which will create Notes from JSON files
MIT License
85 stars 5 forks source link

Can't Import json #52

Closed CyberAnpu closed 11 months ago

CyberAnpu commented 11 months ago

Hello, I am trying to import a JSON file in to Obsidian using the plugin, I am following @Josh Plunkett guide on handlebars, and after pressing import, it says "Import Finished" and nothing changes and nothing is showing up and I'm really lost. I tried to search for a solution but couldn't find anything

CyberAnpu commented 11 months ago

image

I'm also adding a photo of the settings I use and the console for reference (the only 2 options not visible in the import settings are the file that I've chosen and the "Import" button)

farling42 commented 11 months ago

If you haven't already done it, it might be worth disabling other plugins which try to process notes, such as the markdown-attributes plugin that appears in your log whilst doing the import.

Did you generate the markdown template yourself, or is it one that Josh&co have made?

farling42 commented 11 months ago

Also, are you certain that your "Test.json" is in the correct format for the chosen markdown file? Since you haven't specified a "Field containing the data", the plugin assumes that the top-level of your json file contains an array (or a single top-level object).

farling42 commented 11 months ago

In the console on the right, if you change the logging level from "Default Levels" to "All Levels" (or whatever the "all" selection is labelled), then you might see more information about what is happening.

CyberAnpu commented 11 months ago

I am indeed using the same format he used in his video, I just switched to "all levels" in the console and I disabled all of the other plugins and it still gives the same message and doesn't do anything

farling42 commented 11 months ago

Is it possible to have a copy of your Test.json, so that I can see what the data looks like.

CyberAnpu commented 11 months ago

Test.txt

Hi, sorry for the late delay! I have attached the Test file but as a "txt" because github doesn't let me post a json file. but the original is indeed .json

farling42 commented 11 months ago

You need to tell the importer where to find the data in your JSON file.

In your case, you will need to set the field "Field containing the data" to the string "spell".

The importer will then look at the "spell" field of the top-level JSON object that is defined in the file.

CyberAnpu commented 11 months ago

yesssssssssss it worked!!! thank you so so much!!!