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() ... >
Here is a complete sample
var casper = require('casper').create(); var json = require('test.json'); require('utils').dump(json); casper.echo(json['test']); casper.exit();