Query on non empty object field having multiple keys or to check size of object greater than 1

HI @Prasad_Saya, We tried working with aggregation query using $objectToArray but the query doesn’t use indexes as it’s taking COLSCAN even though I have an index on that field.
But below query which I shared is taking index i.e. IXSCAN. So, hopefully, there won’t be any downside to doing this.

db.col.find({"test": {"$gt": {"a": 1} }})

Let us know your thoughts on this.

Thanks.