add getSelectedParent helper

Change-Id: Ie984e3418cf29f0b8af5eb5de41ad34c3e340637
Reviewed-on: http://review.couchbase.org/23706
Reviewed-by: Pavel Paulau <pavel.paulau@gmail.com>
Tested-by: Pavel Paulau <pavel.paulau@gmail.com>