Question: I have a Python dictionary 

```
original_dict={'body': '{"infra":["dev4","elk"],{"type":"file_integrity"}'}

```

I want to be able to parse original\_dict keys and values as a normal dictionary which I am not able to do now because 'body' key has a a dictionary casted as string and therefore I am not refer to any of it's keys. So I should be able to say:

```
infra=original_dict['body]['infra']

```

Can anyone help me out with this.

Answer: 
> 
> This is what I've tried:
> 
> 
> 
> ```
> cities.map(city=>JSON.parse(city.coordinates))
> 
> ```
> 
> 

`map()` created you a brand new, separate array with the coordinates only, which you have thrown away afterwards.

> 
> However, if I manually print a position like `console.log(JSON.parse(cities[0].coordinates))` [...] How can I make it automatically via loop?
> 
> 
> 

Well, put it in a loop:

```
for(let city of cities)
  city.coordinates = JSON.parse(city.coordinates);

```

---

However your example data is syntactically incorrect, there are `,}`-s at the end of the objects (after the `true`/`false`), and the supposed JSON data is not JSON, like

```
{type':'Point','coordinates':[151.2158203,-33.8704156]}
     ^it has no pair, and it should be double quote anyway, all of them
{"type":"Point","coordinates":[151.2158203,-33.8704156]} <-- this is JSON

```
What I think might be happening is that you're doing the map right but not returning the result.

For example `mynumbers.map(num => num++)` won't actually effect `mynumbers` at all. You have to assign the result of the `map` to another variable...

```js
const parsedCities = cities.map(city=>JSON.parse(city.coordinates))

```

Now your new `parsedCities` variable will look like you want it to and the original `cities` array will remain unchanged.