'Can I create a django view that returns a json object rendered from JavaScript

I want to create a view that simply executes some JavaScript and displays the output in JSON form. I want to keep this JavaScript execution away from the user, so is it possible to have a client-side view that waits for the resulting JSON string. Or in other words "waits" and gets for the first view to print the json to the HTML body?



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source