title: Replace values from json file with ones in a text file
body: <p>I have 2 files, I want to replace all the values in the JSON file with ones from the new file.</p>
  
  <p>My JSON format is something like:</p>
  
  <pre><code>{
   "id": 1,
   "name": "",
   "code": 9.3
   },
  
   {
   "id": 2,
   "name": "Test",
   "code": 5.0
   },
  </code></pre>
  
  <p>My .txt file is:</p>
  
  <pre><code>1 - 9.9
  2 - 3.4
  </code></pre>
  
  <p>etc</p>
  
  <p>So for all ids in the json file equal to the 1st number in the text file I want to replace "code" with the 2nd number in the line, which is inside the .txt file.</p>