cfg = rs.conf()
// Set the priority of the first member to a high value, like 10
cfg.members[0].priority = 10
// Set the priority of other members to a low value, like 1
cfg.members[1].priority = 1
cfg.members[2].priority = 1
rs.reconfig(cfg)
rs.status()