title: Update object property in nested array using Javascript or Lodash
body: <p>I have nested array and each object contains unique <code>path</code> property. So i want to update <code>value</code> property based on condition. Below is reference JSON object</p>
  
  <p>So requirement is to update object in below JSON where <code>path=httpgateway.concurrency.cacheConfig.localConcurrent.0.servers.1</code> </p>
  
  <p>Say current value is <code>localhost:9011</code> but i want it <code>localhost:9012</code></p>
  
  <pre><code>[{
      "name": "httpgateway",
      "type": "Object",
      "value": [
          {
              "name": "concurrency",
              "type": "Object",
              "value": [
                  {
                      "path": "httpgateway.concurrency",
                      "name": "stalePeriod",
                      "type": "PORT",
                      "value": "3000"
                  },
                  {
                      "name": "cacheConfig",
                      "type": "Object",
                      "value": [
                          {
                              "name": "localConcurrent",
                              "type": "Object",
                              "value": [
                                  {
                                      "name": "",
                                      "type": "Array",
                                      "value": [
                                          {
                                              "path": "httpgateway.concurrency.cacheConfig.localConcurrent.0",
                                              "name": "service",
                                              "type": "TEXT",
                                              "value": "/mock/test"
                                          },
                                          {
                                              "name": "servers",
                                              "type": "Object",
                                              "value": [
                                                  {
                                                      "name": "",
                                                      "type": "Array",
                                                      "value": [
                                                          {
                                                              "path": "httpgateway.concurrency.cacheConfig.localConcurrent.0.servers.0",
                                                              "name": "hostName",
                                                              "type": "URL",
                                                              "value": "localhost:9010"
                                                          },
                                                          {
                                                              "path": "httpgateway.cacheConfig.localConcurrent.0.servers.0",
                                                              "name": "concurrency",
                                                              "type": "NUMBER",
                                                              "value": "5"
                                                          }
                                                      ]
                                                  },
                                                  {
                                                      "name": "",
                                                      "type": "Array",
                                                      "value": [
                                                          {
                                                              "path": "httpgateway.concurrency.cacheConfig.localConcurrent.0.servers.1",
                                                              "name": "hostName",
                                                              "type": "URL",
                                                              "value": "localhost:9011"
                                                          },
                                                          {
                                                              "path": "httpgateway.cacheConfig.localConcurrent.0.servers.1",
                                                              "name": "concurrency",
                                                              "type": "NUMBER",
                                                              "value": "5"
                                                          }
                                                      ]
                                                  }
                                              ]
                                          }
                                      ]
                                  }
                              ]
                          }
                      ]
                  }
              ]
          }
      ]
  }]
  </code></pre>