Output index to json.