Is there any convenient way to load a local JSON file into a variable with CasperJs?
I saw someone suggest to use
$.getJSON(filename, function() ...
Is there any convenient way to load a local JSON file into a variable with CasperJs?
I saw someone suggest to use
$.getJSON(filename, function() ...
I have the following working on CasperJS 1.1-beta1 and PhantomJS 1.9.1
test.json
test.js
Here is a complete sample
The solution proposed by @hexid worked for me with one change, i added a './' before the file address to denote it is a local file.
test.json
test.js
(i would add it as a comment but I'd need 50+ rep to do that)