fix conf tests.
@@ -235,18 +235,15 @@ func (m *MongoDB) Get(req *state.GetRequest) (*state.GetResponse, error) {
if data, err = bson.MarshalExtJSON(obj, false, true); err != nil {
return &state.GetResponse{}, err
}
- if data, err = json.Marshal(string(data)); err != nil {
- return &state.GetResponse{}, err
- }
case primitive.A:
- newobj := bson.D{{"value", obj}}
+ newobj := bson.D{{Key: value, Value: obj}}
if data, err = bson.MarshalExtJSON(newobj, false, true); err != nil {
return &state.GetResponse{}, err
}
var input interface{}
json.Unmarshal(data, &input)
- value := input.(map[string]interface{})["value"]
+ value := input.(map[string]interface{})[value]
if data, err = json.Marshal(value); err != nil {
return &state.GetResponse{}, err
}
