implement methods to build json query object
#4 add relationship indices (in/out id)
define string constants for in/out id properties