how can I store my cell output as a text file in my local drive?

InquisitiveGeek
New Contributor II

I want to store the output of my cell as a text file in my local hard drive.
I'm getting the json output and I need that json in my local drive as a text file. 

szymon_dybczak
Esteemed Contributor III

This is for tabular result but in my case the output is a JSON String.

So maybe as the last step in your notebook catch JSON output to variable and use python code to save it, for example to dbfs, and then download from dbfs UI