javascript CRUD operations for ingredients