refactored getjson code in 'getAssets' method