input: Write a python function to insert data from a JSON URL into an SQLite database.
  assert check_database("https://example.com/data.json") == True
  assert check_database("https://invalid-url.com/data.json") == False
  assert check_database("https://anotherexample.com/data.json") == True
output: import sqlite3
  import requests
  import json
  
  def check_database(json_url):
      try:
          # Fetch JSON data from the URL
          response = requests.get(json_url)
          data = response.json()
  
          # Connect to SQLite database (or create it)
          conn = sqlite3.connect('example.db')
          cursor = conn.cursor()
  
          # Assuming the JSON data is a list of dictionaries
          if isinstance(data, list) and all(isinstance(item, dict) for item in data):
              # Create table if it doesn't exist
              columns = ", ".join(f"{key} TEXT" for key in data[0].keys())
              cursor.execute(f"CREATE TABLE IF NOT EXISTS data ({columns})")
  
              # Insert data into the table
              for item in data:
                  placeholders = ", ".join("?" * len(item))
                  values = tuple(item.values())
                  cursor.execute(f"INSERT INTO data VALUES ({placeholders})", values)
  
              # Commit the transaction and close the connection
              conn.commit()
              conn.close()
              return True
          else:
              return False
      except:
          return False