func (sc *PrivateContract) GetPrivateState(ctx contractapi.TransactionContextInterface, key string) (string, error) {
	bytes, err := ctx.GetStub().GetPrivateData("Org1AndOrg2", key)
	if err != nil {
		return "", errors.New("Could not read private collection Org1AndOrg2")
	}
	if bytes == nil {
		return "", errors.New("No value found for " + key)
	}
	return string(bytes), nil
}
GetPrivateState - Gets the value for a key from the private collection Org1AndOrg2
package main
import (
	"errors"
	"github.com/hyperledger/fabric-contract-api-go/contractapi"
)
type PrivateContract struct {
	contractapi.Contract
}
func (sc *PrivateContract) PutPrivateState(ctx contractapi.TransactionContextInterface, key string, value string) error {
	return ctx.GetStub().PutPrivateData("Org1AndOrg2", key, []byte(value))
}