I want to remove the items only contain white spaces.
eg: " "
, " "
I want to remove them from buy_items
array.
How to do it ? thanks
sample document
{
"_id": "mark jordan",
"records": [
{
"date": new Date("2012-05-04T08:00:00+0800"),
"buy_items": [
"6829 ",
" ",
"68600 ",
"8830 "
]
},
{
"date": new Date("2011-02-10T08:00:00+0800"),
"buy_items": [
"4659 ",
" ",
"4660 "
]
},
{
"date": new Date("2011-01-09T08:00:00+0800"),
"buy_items": [
" ",
"4659 "
]
}
]
}