Question: I am creating a json string using dictionary and I have to remove only that part from string my string is 

```
[{Id: "code": "AAA" ,  Title: "display": "ANAA,FRENCH POLYNESIA"},{Id: "code": "AAB" ,  Title: "display": "ARRABURY, QL AUSTRALIA"}]

```

I want to remove only 

```
"code":

```

And that part from string using string.Replace('', "")

```
"display":

```

I am trying this:

```
        var entries = dict.Select(d =>  string.Format("{{Id: {0} ,  Title: {1}}}", d.Key, string.Join(",", d.Value)));
        return "" + string.Join(",", entries) + "";

```

Not working to achieve

```
[{Id: "AAA" ,  Title:  "ANAA,FRENCH POLYNESIA"},{Id:  "AAB" ,  Title:  "ARRABURY, QL AUSTRALIA"}]

```

Answer: 
You can run this code:

```
 string json = "[{Id: \"code\": \"AAA\" ,  Title: \"display\": \"ANAA,FRENCH POLYNESIA\"},{Id: \"code\": \"AAB\" ,  Title: \"display\": \"ARRABURY, QL AUSTRALIA\"}]";
 json = json.Replace("\"code\":", String.Empty);
 json = json.Replace("\"display\":", String.Empty);

```

You can remove with replace method if you use **String.Empty**
As suggested, use string.Replace:

```
const string codeToRemove = "\"code\":";
const string displayToRemove = "\"display\":";
var entries = dict.Select(d =>  string.Format("{{Id: {0} ,  Title: {1}}}", d.Key.Replace(codeToRemove, ""), string.Join(",", d.Value.Replace(displayToRemove, ""))));
var result = "" + string.Join(",", entries) + "";

```