const { Schema } = mongoose;
const schemaCat = new Schema({
name: String,
age: Number
});
const Cat = mongoose.model("Cat", schemaCat);
const kitty2 = new Cat({name: "c2", age: 22});
const kitty3 = new Cat({name: "c3", age: 33});
const kitty4 = new Cat({name: "c4", age: 44});
kitty2.save();
kitty3.save();
kitty4.save();
let match = '/categories/5'.split("/").slice(1);
let obj = {
id: match[1],
name: match[0]
}