remove square brackets from json file