save values on elements with same property javascript
<p>I have an array of several entries with some of them with same name .All entries have location but one is empty.I want to save the same value of location into all entries of the array for same user. How can I do that?</p>

<pre><code>      array=[{
                    user: angelos,
                    user_id: 121212,
                    date: 12/12/12,
                    profile_img: cfdf,
                    text: nhkjhgjtdkghd,
                    url: g.htm,
                    location:Romania
                },{
                    user: angelos,
                    user_id: 121212,
                    date: 12/12/12,
                    profile_img: cfdf,
                    text: nhkjhgjsdfsadstdkghd,
                    url: g.htm,
                    location:""
                },{
                    user: Mike,
                    user_id: 121212,
                    date: 12/12/12,
                    profile_img: cfdf,
                    text: nhkjhgjtdkghd,
                    url: g.htm,
                    location:New York
                },{
                    user: Mike,
                    user_id: 121212,
                    date: 12/12/12,
                    profile_img: cfdf,
                    text: nhkjhgjsdfsadstdkghd,
                    url: g.htm,
                    location:""
                }];
</code></pre>
