code: def get_stats_item(self, item):
          
          if isinstance(self.stats, dict):
              try:
                  return self._json_dumps({item: self.stats[item]})
              except KeyError as e:
                  logger.error("Cannot get item {} ({})".format(item, e))
                  return None
          elif isinstance(self.stats, list):
              try:
                  # Source:
                  # http://stackoverflow.com/questions/4573875/python-get-index-of-dictionary-item-in-list
                  # But https://github.com/nicolargo/glances/issues/1401
                  return self._json_dumps({item: list(map(itemgetter(item), self.stats))})
              except (KeyError, ValueError) as e:
                  logger.error("Cannot get item {} ({})".format(item, e))
                  return None
          else:
              return None
docs: Return the stats object for a specific item in JSON format.
  
          Stats should be a list of dict (processlist, network...)