Storing data in theme data directory

According to the docs, I can store JSON and TOML files in a data folder in my theme. I can’t figure out how to access it though. If it was stored in the data directory in my project root, I could do something like {{ index .Site.Data.thedata ‘thevalue’ }}, but that’s not working.
current set up: themes/the-theme/data/the-data.json