Query: when i give "third_party_site_id" value in the above script in result i want only st_site_id value ? How to write the script to get only st_site_id value ?
db.collection.find({'third_party_site_id.fieldName':'valueToCheck'}, {st_site_id:
1})
First part is find query. Second part is projection.
I suggest you to refer documentation