Nearly 40 people were arrested following a Bakersfield police operation conducted to help catch those violating curfew at local parks.