func (broker *Broker) putMap(stub shim.ChaincodeStubInterface, metaName string, meta map[string]uint64) error {
	if meta == nil {
		return nil
	}
	metaBytes, err := json.Marshal(meta)
	if err != nil {
		return err
	}
	return stub.PutState(metaName, metaBytes)
}
putMap for persisting meta state into ledger
package main
import (
	"bytes"
	"encoding/json"
	"fmt"
	"strconv"
	"github.com/golang/protobuf/proto"
	"github.com/hyperledger/fabric/core/chaincode/shim"
	pb "github.com/hyperledger/fabric/protos/peer"
)
type response struct {
	OK      bool   `json:"ok"`
	Message string `json:"message"`
	Data    []byte `json:"data"`
}
func successResponse(data []byte) pb.Response {
	res := &response{
		OK:   true,
		Data: data,
	}
	data, err := json.Marshal(res)
	if err != nil {
		panic(err)
	}
	return shim.Success(data)
}
func errorResponse(msg string) pb.Response {
	res := &response{
		OK:      false,
		Message: msg,
	}
	data, err := json.Marshal(res)
	if err != nil {
		panic(err)
	}
	return shim.Error(string(data))
}