[NH:1]1[C:9]2[C:4](=[CH:5][C:6]([C:10]([O:12][CH3:13])=[O:11])=[CH:7][CH:8]=2)[CH:3]=[N:2]1.[C:14]([O-])([O-])=O.[K+].[K+].IC>CN(C=O)C>[CH3:14][N:1]1[C:9]2[C:4](=[CH:5][C:6]([C:10]([O:12][CH3:13])=[O:11])=[CH:7][CH:8]=2)[CH:3]=[N:2]1.[CH3:14][N:2]1[CH:3]=[C:4]2[C:9]([CH:8]=[CH:7][C:6]([C:10]([O:12][CH3:13])=[O:11])=[CH:5]2)=[N:1]1To a solution of methyl 1H-indazole-5-carboxylate (2.5 g, 14 mmol) in DMF (45 mL) was added K2CO3 (4.90 g, 35.5 mmol) followed by iodomethane (1.77 mL, 28.4 mmol). The mixture was stirred at room temperature for 2 hours and then heated at 50° C. overnight. The mixture was concentrated, dissolved in EtOAc and washed with saturated aqueous NaCl. The organic extract was dried over Na2SO4, filtered and concentrated. The crude material was purified by CombiFlash (80 g column, 25-45% EtOAc/heptane) to provide methyl 1-methyl-1H-indazole-5-carboxylate (1.07 g, 40%) and methyl 2-methyl-2H-indazole-5-carboxylate (227 mg, 8.4%).