Modify get/put examples to support indices