Help with take distance in osrm

I’m trying make a javascript web app and I need know the distance between two points, but don’t know how process the json response to extract the rout distance. Can anyone can help me?
thanks
luiz from brasil