Question: I am trying to read a MongoDB document looking like this

```
{
"_id":"a770cf8d-a2ec-45a0-8289-b312c6315997"
"foo1":"value of foo1",
"foo2":"value of foo2"
}

```

I am using the C# driver. The problem is that I get the following error: 

```
Cannot deserialize a 'Guid' from BsonType 'Int32'.

```

My C# code looks like this:

```
var myCollection = myDatabase.GetCollection<MyType>(this.collectionName);
List<MyType> myThings = myCollection.Find(Builders<MyType>.Filter.Empty).ToList();

```

MyType looks like this:

```
[DataContract]
public class MyType
{
    [DataMember(Name="_id")]
    [BsonId(IdGenerator = typeof(CombGuidGenerator))]
    public Guid Id { get; set; }

    [DataMember(Name = "foo1")]
    [BsonElement("foo1")]
    public string Foo1{ get; set; }

    [DataMember(Name = "foo2")]
    [BsonElement("foo2")]
    public string Foo2{ get; set; }
}

```

Answer: 
Your nested object keys should be wrapped in double qoutes instead of single, it is better to fix this from backend, here is some simple solution for do it with JS

Angular pipe

```
transform(value: any, args?: any): any {
    // i'm guessing that your data (value) is string
    return typeof value==='string' ? JSON.parse(value.replace(/'/g, '"')) : value;
}

```
Not sure, but maube

```
transform(value: any, args?: any): any {
    return JSON.parse(value);
}

```

This is if you array really must be in string