I have the following Codepen working with a very simple example of SurveyJS. It uses the following JSON:
var json = {
"questions": [{
"type": "text",
"title": "Test question 1",
"name": "Test question"
},
{
"type": "comment",
"title": "Test question 2",
"name": "Test question 2"
},
]
}
When I try to use a remote file for the JSON the new Codepen is not working.
I tried requesting the JSON as follows:
var giturl = "https://gist.githubusercontent.com/flowtrader2016/cdb63289fc3b4c81df9186e339233ffa/raw/1ee651735f501d5288082a0f3147ea48dc07911c/surverytest.json"
$.getJSON( giturl, function (data) {
var json = data
});
I'm just starting to learn a bit of Javascript so appreciate any help with this.