moved responsibility for getNestedData to the inventory helper