Title: How to query data from mongoDB which column is an array
Tags: mongodb
Question: "name": "Grieg And Sibelius Songs",
"status": 1,
"lastupdate": 1306294550,
"intro": "",
"artist": [
"ar9341cd00668311e0a45217d9fa59cf02",
"ar9341cd00668311e0a45217d9fa59cf0x"
"publisher": "(Warner Music)",
"release_date": "2006-05-08"
I want to find the the data that artist column "ar9341cd00668311e0a45217d9fa59cf02" in array("ar9341cd00668311e0a45217d9fa59cf02","ar9341cd00668311e0a45217d9fa59cf0d","ar9341cd00668311e0a45217d9fa59cf0r")  what should I　do?


Here is another answer: You can use $exists to check the presence of the item in array,
db.yourcollectionname.find({artist: {$exists:'ar9341cd00668311e0a45217d9fa59cf02'}})

{'source': 'StackExchangeDataset', 'subset': 'stackoverflow.com', 'metadata': {'AnswerCount': 1, 'CommentCount': 0, 'ContentLicense': 'CC BY-SA 3.0', 'CreationDate': '2011:00:09/14/11', 'FavoriteCount': None, 'PostTypeId': 1, 'Tags': '<mongodb>', 'Title': 'How to query data from mongoDB which column is an array', 'ViewCount': 468, 'id': 7414112, 'user_AboutMe': None, 'user_AccountId': 445612.0, 'user_DisplayName': 'user838172', 'user_Reputation': 1.0, 'user_Views': 0.0, 'user_id': 838172.0}}