Database

[{totalCreatedForms:[{formName:"formone",formIndex:0},{formName:"formtwo",formIndex:1},{formName:"formthree",formIndex:2}]}]

Query

db.collection.find({"totalCreatedForms.formName":"formtwo"},{"_id":0,"totalCreatedForms.formIndex.$":1})

Result