title: Getting specific values from a JSON file and put it through to specific fields in an existing YAML file
body: <p>This is the JSON file, <code>vip5.json</code>.</p>
  
  <pre class="lang-json prettyprint-override"><code>{
   "App Name": "test", 
   "Email": "test@test.com", 
   "Employee ID": "abc", 
   "Load Balancing Method": "Ratio", 
   "Network": "CMN", 
   "Pool Member": "pucq", 
   "Pool Monitor": "tcp", 
   "Pool name": "pool", 
   "SSL": "Required", 
   "VIP Name": "vs"
  }
  </code></pre>
  
  <p>This is the YAML file <code>test.yaml</code>. </p>
  
  <pre class="lang-yaml prettyprint-override"><code>---
  server: pucl-k-030.company.com
  
  partition: Common
  
  
  nodes:
    - host: 10.74.204.75
      name: node-puex-spi-109
      description: PUEX1
      monitors:
        - /Common/icmp
  
    - host: 10.74.204.76
      name: node-puex-spi-110
      description: PUEX2 
      monitors:
        - /Common/icmp
  
  pool:
    name: pool-puex-indexers
    descriptions: PUEX Indexers pool
    lb_method: 
    monitors:
      - /Common/tcp
  
  
  pool_members:
    - node_name: node-puex-109
      port: 9997
  
    - node_name: node-puex-110
      port: 9997
  
  virtual_server:
    name: vs-ng-puex-test-frwd
    destination: 1.1.1.1
    ip_protocol: udp
    port: 999
    type: performance-l4
    profiles:
      - name: fastL4 
    pool: pool-puex-indexers
  </code></pre>
  
  <p>I want to get these values and add it in certain fields in my YAML file. Let's say i want to get the value of <code>Ratio</code> from <strong>"Load Balancing Method:"</strong> in the JSON file and put that in the <strong>"lb_method:"</strong> in the YAML file. How do I do that? </p>
  
  <p>I tried to read the JOSN file and iterate through the file. But I'm not sure if that's the way to go.</p>
  
  <pre><code>import json
  import requests
  import yaml
  
  url = "http://127.0.0.1:5000/vip5.json"
  r = requests.get(url)
  json_file = json.loads(r.content)
  
  print(json_file)
  </code></pre>