How will you convert nitromethane into dimethylamine?

How will you convert
(i) nitromethane into dimethylamine?
(ii) propanoic acid into ethanoic acid?

Nitromethane into dimethylamine