some javascript for json file parser