I have many songs contained in a collection, each containing _id and description, in the description is an array of elements including line and sub_fingerprint, I pass on _id and line. How to retrieve subfingerprint? Thanks I have a mongo command called
db.getCollection ('song_fingerprint'). Find ({_id: 1},
{Fingerprint: {$ elemMatch: {line: 102}}})
But in Java it is very difficult ...
{
"_id" : 13,
"fingerprint" : [
{
"line" : 1,
"sub_finger" : "74076e76"
},
{
"line" : 2,
"sub_finger" : "74076ef6"
},
{
"line" : 3,
"sub_finger" : "74076ef6"
},
{
"line" : 4,
"sub_finger" : "74056ef6"
},
{
"line" : 5,
"sub_finger" : "76856ed6"
},
{
"line" : 6,
"sub_finger" : "76e52ed6"
},
{
"line" : 7,
"sub_finger" : "76e58cd6"
}]
}