title: How to make a JSON with custom fields
body: <p>I am not too sure if this is even possible as i was not able to find any exact information on it. I will try to best explain what i would like to do below.</p>
  
  <p>So i am using the requests library to pull information from an API. Once i have this data i use regex to find all matches for a specific piece of information from the json output.</p>
  
  <p>The code i have is:</p>
  
  <pre><code>for i in data['resources']:
          if 'id' in i and 'name' in i:
              b = i['name'], i['id']
              k = str(b)
              if  re.findall("'Server-Ownership-\w+', \w+", k):
                  matchedOwners = re.findall("'Server-Ownership-\w+', \w+", k)[0]
                  j = str(matchedOwners)
                  print(j)
  </code></pre>
  
  <p>The output of this code gives me:</p>
  
  <pre><code>'Server-Ownership-A', 100
  'Server-Ownership-B', 200
  'Server-Ownership-C', 300
  'Server-Ownership-D', 400
  'Server-Ownership-E', 500
  'Server-Ownership-F', 600
  'Server-Ownership-G', 700
  'Server-Ownership-H', 800
  </code></pre>
  
  <p>What i would like to do is somehow reference each server-ownership line as its own so that i can use the ID at the end associated with it to perform a get request for each server. My problem is that i cannot determine a way to call on any of this data. I figured maybe if i could turn it into json and create a 'name' field for the 'server-ownership' part and then an 'id' field for the IDs at the end. Is this even possible or is there a better way to approach this?</p>
  
  <p>Any help is greatly appreciated!</p>