low idle on 2002 Dodge Ram 1500

out of the blue, my engine just shuts off when i let off the gas

Asked by for the 2002 Dodge Ram 1500
I had same problem. I disconnected battery cables for about 1/2 hr and cleaned battery connections. Sounds too simple, but this cleared the problem.
2 more answers
Have it scanned for a code. it could be a variety of things that are wrong. And its probably a sensor. Specially the crankshaft position sensor or the Idle position sensor and could be the transmission speed sensor
Make sure your throttle body isn't clogged up with carbon buildup. Most Dodge and Chrysler/Jeep engines suffer from carbon buildup in the throttle bore and butterfly. If the throttle bore and valve is covered in the black goo, spray some throttle body cleaner on a towel and start scrubbing the bore and edges of the valve. Don't spray directly on the throttle body you don't want to damage any sensors! The buildup slowly closes off the throttle opening causing a low idle.
hope this helps