code: def json_to_entity(tc_data, value_fields, resource_type, resource_type_parent):
          
          if not isinstance(tc_data, list):
              tc_data = [tc_data]
  
          entity_array = []
          for d in tc_data:
              entity = {'id': d.get('id'), 'webLink': d.get('webLink')}
  
              # value
              values = []
              if 'summary' in d:
                  values.append(d.get('summary'))
              else:
                  for field in value_fields:
                      if d.get(field) is not None:
                          values.append(d.get(field))
              entity['value'] = ' : '.join(values)
  
              # type
              if d.get('type') is not None:
                  entity['type'] = d.get('type')
              else:
                  entity['type'] = resource_type
  
              if resource_type_parent in ['Indicator']:
                  entity['confidence'] = d.get('confidence')
                  entity['rating'] = d.get('rating')
                  entity['threatAssessConfidence'] = d.get('threatAssessConfidence')
                  entity['threatAssessRating'] = d.get('threatAssessRating')
                  entity['dateLastModified'] = d.get('lastModified')
  
              if resource_type_parent in ['Indicator', 'Group']:
                  if 'owner' in d:
                      entity['ownerName'] = d['owner']['name']
                  else:
                      entity['ownerName'] = d.get('ownerName')
                  entity['dateAdded'] = d.get('dateAdded')
  
              if resource_type_parent in ['Victim']:
                  entity['ownerName'] = d.get('org')
  
              entity_array.append(entity)
  
          return entity_array
docs: Convert ThreatConnect JSON response to a TCEntityArray.
  
          .. Attention:: This method is subject to frequent changes.
  
          Args:
              tc_data (dictionary): Array of data returned from TC API call.
              value_fields (list): Field names that contain the "value" data.
              resource_type (string): The resource type of the tc_data provided.
              resource_type_parent (string): The resource parent type of the tc_data provided.
  
          Returns:
              (list): A list representing a TCEntityArray.