input: Write a function to parse and extract the data from a SQLite database and store it in a JSON file.
  assert os.path.exists('extract.json') == True
output: import sqlite3
  import json
  import os
  
  def parse_and_extract_db_to_json(db_path, json_path):
      # Connect to the SQLite database
      conn = sqlite3.connect(db_path)
      cursor = conn.cursor()
  
      # Get the list of tables in the database
      cursor.execute("SELECT name FROM sqlite_master WHERE type='table';")
      tables = cursor.fetchall()
  
      # Dictionary to store the data
      db_data = {}
  
      # Iterate through tables and fetch data
      for table_name in tables:
          table_name = table_name[0]
          cursor.execute(f"SELECT * FROM {table_name}")
          columns = [description[0] for description in cursor.description]
          rows = cursor.fetchall()
          db_data[table_name] = [dict(zip(columns, row)) for row in rows]
  
      # Write the data to a JSON file
      with open(json_path, 'w') as json_file:
          json.dump(db_data, json_file, indent=4)
  
      # Close the connection
      conn.close()
  
  # Usage
  parse_and_extract_db_to_json('your_database.db', 'extract.json')