Question: ```
var myvar = '
    myname({    "country":{        "cities":[ {"id":"3", "population":"3700"},{"id":"5", "population":"3730"}]   } });';

```

So that `myvar` is a string.

How to get `citiesArr` array of `city` objects from `myvar`?

Answer: 
To keep a flat git history, you should use `rebase` instead of `merge` when you want to update branches. You could see an explanation of rebase versus merge in [another post](https://stackoverflow.com/a/37724516/2394026).

From your current state, if your `HEAD (master)` is the merge, you could do

* Clean your working dir (or stash changes)
* `git reset --hard LastCommit` , where `LastCommit` is the last commit from red branch which is not on the blue one.
* `git rebase blueBranch redBranch`

> 
> [git-rebase](https://git-scm.com/docs/git-rebase) - Reapply commits on top of another base tip
> 
> 
>
In this case, `git reset HEAD^2 --hard` is enough.