Added methods to enable object subscripting
Added test case for object subscripting