change json to script