I have a markdown file imported in a node module like this through a webpack loader
import mardownFile from \'./markdownfile.md\'
this file is a
Try the markdown-to-json library.
npm install -g markdown-to-json
Given a file called lottery.md
I go to the directory in my terminal and type:
m2j lottery.md
This outputs the json on the screen.
If you're using a bash based terminal you can pipe that output into a file like this.
m2j lottery.md >> lottery.json
Which will create a json file called lottery.json
in the same folder as your markdown.
For additional help you can use:
m2j -h