1
//Food.js

module.exports = {

  attributes: {

    foodName: {
      type: 'string',
      required: true,
      unique: true
    },
    imgUrl: {
      type: 'string'
      //required: true
    }

  }

};

While saving the food item If I am giving "Roasted Fennel & Apple + Curried Red Lentils" as food name, then in MongoDB it is saving like "Roasted Fennel". It's not allowing any chars after "&".

Can anyone plz help me how to save special chars like "&","+" etc.

Travis Webb
  • 14,688
  • 7
  • 55
  • 109

0 Answers0