code: def jpath_values(structure, jpath):
      
      # Current working node set.
      nodes_a = [structure]
  
      # Next iteration working node set.
      nodes_b = []
  
      # Process sequentially all JPath chunks.
      chunks = jpath_parse_c(jpath)
      for chnk in chunks:
          # Process all currently active nodes.
          for node in nodes_a:
              key = chnk['n']
              if not isinstance(node, dict) and not isinstance(node, collections.Mapping):
                  continue
  
              # Process indexed nodes.
              if 'i' in chnk:
                  idx = chnk['i']
                  # Skip the node, if the key does not exist, the value is not
                  # a list-like object or the list is empty.
                  if not key in node or not (isinstance(node[key], (list, collections.MutableSequence))) or not node[key]:
                      continue
                  try:
                      # Handle '*' special index - append all nodes.
                      if str(idx) == '*':
                          nodes_b.extend(node[key])
                      # Append only node at particular index.
                      else:
                          nodes_b.append(node[key][idx])
                  except:
                      pass
  
              # Process unindexed nodes.
              else:
                  # Skip the node, if the key does not exist.
                  if not key in node:
                      continue
  
                  # Handle list values - expand them.
                  if isinstance(node[key], (list, collections.MutableSequence)):
                      for i in node[key]:
                          nodes_b.append(i)
                  # Handle scalar values.
                  else:
                      nodes_b.append(node[key])
  
          nodes_a = nodes_b
          nodes_b = []
  
      return nodes_a
docs: Return all values at given JPath within given data structure.
  
      For performance reasons this method is intentionally not written as
      recursive.
  
      :param str structure: data structure to be searched
      :param str jpath: JPath to be evaluated
      :return: found values as a list
      :rtype: :py:class:`list`