My Object list is like below.
{
"altText": "",
"anchorText": "$3 Off Christmas Blend Coffee - 1 Lb. Ground",
"anchorType": "href",
"domainRating": 83,
"externalLinks": 41,
"internalLinks": 100,
"lastVisited": 0,
"lastVisitedDateString": "June 23, 2017",
"noFollow": false,
"noFollowUrl": "Do Follow",
"rating": 13,
"sourceURL": "https://www.goodsearch.com/coffee-category/coupons",
"targetURL": "https://www.priesters.com/",
"title": "Coffee Coupons, Promo Codes, Deals, Discounts - Goodshop"
},
{
"altText": "",
"anchorText": "$3 Off Christmas Blend Coffee - 1 Lb. Ground",
"anchorType": "href",
"domainRating": 83,
"externalLinks": 41,
"internalLinks": 100,
"lastVisited": 0,
"lastVisitedDateString": "June 23, 2017",
"noFollow": false,
"noFollowUrl": "Do Follow",
"rating": 13,
"sourceURL": "https://www.goodsearch.com/coffee-category/coupons",
"targetURL": "http://www.priesters.com/",
"title": "Coffee Coupons, Promo Codes, Deals, Discounts - Goodshop"
}
In the above object list, there is one field called "anchorText". This field value started with "$" but It's not getting saving in Mongo collection.
Java code saving collection in Mongodb:
if (!mongoTemplate.collectionExists(COLLECTION)) {
mongoTemplate.createCollection(COLLECTION);
}
mongoTemplate.save(webStats, COLLECTION);
How can I fix this issue.