class_docstr: Class for loading json data with batches 
class_docstr_tok: ["Class","for","loading","json","data","with","batches"]
code: def extract(self, export: bool = False):
      self._extract_files_paths(extension="json")
  
      dict_list = []
      labels = []
      for file_path in self.meta_df["file_path"].tolist():
          with open(file_path, "r") as text_file:
              content = text_file.read()
              content_dict = json.loads(content)
              dict_list.append(content_dict)
              try:
                  label = content_dict[self.target_name]
              except KeyError:
                  print(file_path)
                  label = None
              labels.append(label)
  
      self.meta_df[self.target_name] = pd.Series(
          data=labels, index=self.meta_df.index
      )
  
      for field in self.fields_to_use:
          # generate feature column for each extracted field
          new_feature = pd.Series(
              data=[d[field] for d in dict_list],
              index=self.meta_df.index,
          )
          # add column with name 'field' and value 'new_feature'
          # to the features data frame after 'file_path' column
          self.meta_df.insert(
              loc=self.meta_df.columns.get_loc("file_path"),
              column=field,
              value=new_feature,
          )
      # remove redunant column with file path
      self.meta_df = self.meta_df.drop(["file_path"], axis=1)
  
      if export:
          self.export_to_csv()
  
      return self.meta_df
  
imports: import glob
  import json
  import os
  from abc import ABC, abstractmethod
  import pandas
label_desc: Use image node_id 2 for calling the JSONBatchLoader obj's underlying member method code with example usage: obj.extract(export) and returns: self