Hi Javascript Newbie question,

```
var aarr = [
 {
    "label": "Name",
    "visible": true,
    "value": "HOW"
 },
 {
    "label": "Age",
    "visible": false,
    "value": "23"
 },
 {
    "label": "goodToGo",
    "visible": false,
    "value": "Yes"
 },
 {
    "label": "authenticatedflag",
    "visible": true,
    "value": "No"
 }
];

```

Scenario: (How can i achieve this logic within in single loop)

In need to modify the above array based on this conditions:

> 
> E.g: if label === "Name" && "value" === "HOW" then Modify Age.value to
>  "27" and authenticatedflag.value to "No", in the same loop itself,
>  label === "Age" && "value" === "27" then, modify the goodToGo.value to
>  No and authenticatedflag.value to "Yes"
> 
> 
> 

Part of the code would.

```
aarr.map(aObj => {
    if(aObj.label === "Name" && aObj.value === "HOW") {
        // In this case i need to modify the aarr contents
    }
    // Before this loop executes the aarr contents should be changed.
    if(aObj.label === "Age" && aObj.value === "27") {
        // Once again modify the contents of the array before passing to next condition
    }
});

```

Comment No:2 by @Tushar Seems to work half 

```
if (arr.find(o => o.label === 'Name' && o.value === 'HOW')) {
    arr.find(o => o.label === 'Age').value = 27;
    arr.find(o => o.label === 'authenticatedflag').value = 'No';
} else if (arr.find(o => o.label === 'Age' && o.value === '27')) {
    arr.find(o => o.label === 'goodToGo').value = 'No';
    arr.find(o => o.label === 'authenticatedflag').value = 'Yes';
}

console.log(arr);

/*
[ { label: 'Name', visible: true, value: 'HOW' },
  { label: 'Age', visible: false, value: 27 },
  { label: 'goodToGo', visible: false, value: 'Yes' },
  { label: 'authenticatedflag', visible: true, value: 'No' } ]
*/

```

In this case only one condition get satisfied actually it needs to satisfy both the conditions.