If I've to get something like analogous to SQL statement from rs.status output to print specific value of an attribute in mongoDB -
Something like print health of specific node of a replica set from rs.status.
select health from rs.status where hostname like 'abc:123'
or something to print lagtime of a specific secondary replica node with respect to Primary node using :
print lagtime from rs.printSlaveReplicationInfo() where hostname like 'abc:123'
what would be the simple query or JS to run against a replica set connection string ?