title: How to set value to json object from another json object?
body: <p>I have two json objects: <code>a, b</code>. I need to set <code>seqNo</code> to <code>b</code> json object from <code>a</code> json object based on the id. How would I go about doing this?</p>
  
  <pre><code>var a = [{id: "Make",   seqNo: 4},
              {id: "Model",  seqNo: 1},
              {id: "XModel", seqNo: 2},
              {id: "Rate",   seqNo: 3},
              {id: "Price",  seqNo: 0}];
  
  var b = [
             {id: "Make", field: "make", seqNo: setvalue},
             {id: "Model", field: "model", seqNo: setvalue},
             {id: "XModel", field: "model", seqNo: setvalue},
             {id: "Rate", field: "price", seqNo: setvalue},
             {id: "Price", field: "price", seqNo: setvalue}
          ];
  </code></pre>
  
  <p>output:-</p>
  
  <pre><code>var c = [
              {headerName: "Make", field: "make", seqNo: 4},
              {headerName: "Model", field: "model", seqNo: 1},
              {headerName: "XModel", field: "model", seqNo: 2},
              {headerName: "Rate", field: "price", seqNo: 3},
              {headerName: "Price", field: "price", seqNo: 0}
          ];
  </code></pre>