Hi Team,
I want to avoid bottom part of the output in MongoDB.
For ex:
MongoDB Enterprise replica001:PRIMARY> db.adminCommand( { getParameter: 1, featureCompatibilityVersion: 1 } )
{
"featureCompatibilityVersion" : {
"version" : "4.0"
},
"ok" : 1,
"operationTime" : Timestamp(1609422524, 1),
"$clusterTime" : {
"clusterTime" : Timestamp(1609422524, 1),
"signature" : {
"hash" : BinData(0,"00U9i7OroDkKT0fyn18KvNX7dM8="),
"keyId" : NumberLong("6895568894216372225")
}
}
}
In the above output, I want to avoid the output part starting from “ok:1”
How can i do that…
I want an output similar to the following:
{
"featureCompatibilityVersion" : {
"version" : "4.0"
}
}
Please suggest me how I can achieve this.
Thanks in advance