title: Use a value from one JSON to append in another using jq
body: <blockquote>
  <p>Can some one please help me I have a nodekey file from which I want to take the address and
  append it in a genesis.json file.</p>
  </blockquote>
  <blockquote>
  <p>This is the &quot;nodekey file&quot; . I want to fetch the address's value
  {4cb6046ae395bb6b5f9febc7bdcae28489268725} from this file and append it in the
  genesis.json file in nested key.</p>
  </blockquote>
  <pre><code>{&quot;address&quot;:&quot;4cb6046ae395bb6b5f9febc7bdcae28489268725&quot;,&quot;crypto&quot;:{&quot;cipher&quot;:&quot;aes-128-ctr&quot;,&quot;ciphertext&quot;:&quot;04c9b4c56b717d2f64714de8aa9112c182eccc4e8e578b4c6d89b1621a3cd7c7&quot;,&quot;cipherparams&quot;:{&quot;iv&quot;:&quot;fca58569c4c864f9d9ac5953ee29f713&quot;},&quot;kdf&quot;:&quot;scrypt&quot;,&quot;kdfparams&quot;:{&quot;dklen&quot;:32,&quot;n&quot;:262144,&quot;p&quot;:1,&quot;r&quot;:8,&quot;salt&quot;:&quot;c2331c103e8a3321796fbaa79bcff301e22fa9b8cc4fb811ca0cbf96b48e697b&quot;},&quot;mac&quot;:&quot;0656363e9828aa0f29215261c442169f33816156ce7d7ea795849c971a39fb7a&quot;},&quot;id&quot;:&quot;3da32d09-f0b0-44a0-98ab-e9d03df7c952&quot;,&quot;version&quot;:3}
  </code></pre>
  <blockquote>
  <p>The below is the genesis file. In this file I want to append the address inside the alloc section at the end like this..</p>
  </blockquote>
  <pre><code>{
      &quot;alloc&quot;: {
         &quot;0xed9d02e382b34818e88b88a309c7fe71e65f419d&quot;: {
            &quot;balance&quot;: &quot;1000000000000000000000000000&quot;
         },
         &quot;0xca843569e3427144cead5e4d5999a3d0ccf92b8e&quot;: {
            &quot;balance&quot;: &quot;1000000000000000000000000000&quot;
         },
         &quot;0x0fbdc686b912d7722dc86510934589e0aaf3b55a&quot;: {
            &quot;balance&quot;: &quot;1000000000000000000000000000&quot;
         },
         &quot;0x9186eb3d20cbd1f5f992a950d808c4495153abd5&quot;: {
            &quot;balance&quot;: &quot;1000000000000000000000000000&quot;
         },
         &quot;0x0638e1574728b6d862dd5d3a3e0942c3be47d996&quot;: {
         &quot;balance&quot;: &quot;1000000000000000000000000000&quot;
         }
         --want to add my address here
      },
      &quot;coinbase&quot;: &quot;0x0000000000000000000000000000000000000000&quot;,
          &quot;config&quot;: {
          &quot;homesteadBlock&quot;: 0,
          &quot;byzantiumBlock&quot;: 0,
          &quot;constantinopleBlock&quot;: 0,
          &quot;chainId&quot;: 10,
          &quot;eip150Block&quot;: 0,
          &quot;eip155Block&quot;: 0,
          &quot;eip150Hash&quot;: &quot;0x0000000000000000000000000000000000000000000000000000000000000000&quot;,
          &quot;eip158Block&quot;: 0,
          &quot;maxCodeSize&quot;: 35,
          &quot;isQuorum&quot;: true
      },
     &quot;difficulty&quot;: &quot;0x0&quot;,
     &quot;extraData&quot;: &quot;0x0000000000000000000000000000000000000000000000000000000000000000&quot;,
     &quot;gasLimit&quot;: &quot;0xE0000000&quot;,
     &quot;mixhash&quot;: &quot;0x00000000000000000000000000000000000000647572616c65787365646c6578&quot;,
     &quot;nonce&quot;: &quot;0x0&quot;,
     &quot;parentHash&quot;: &quot;0x0000000000000000000000000000000000000000000000000000000000000000&quot;,
     &quot;timestamp&quot;: &quot;0x00&quot;
  
  
  }
  </code></pre>
  <blockquote>
  <p>I tried using jq .alloc +=  --   . But this replaces the last existing address in the alloc
  section.</p>
  </blockquote>