Nested key-value database type for orbit-db.
npm install @orbitdb/nested-db

$ pnpm add @orbitdb/nested-db
`
Introduction
As Nested database is like a KeyValue database, but it can contain nested values that can be accessed as JSON.Examples
A simple example with
Nested:
`ts
import { createOrbitDB, useDatabaseType } from "@orbitdb/core";
import { Nested } from "@orbitdb/nested-db";// Register nested database type. IMPORTANT - must call before creating orbit instance !
useDatabaseType(Nested);
const orbitdb = await createOrbitDB({ ipfs })
const db = await orbitdb.open({ type: "nested" });
await db.put("a", 1);
await db.put("b/c", 2);
await db.put(["b", "d"], 3) // Alternative syntax
const all = await db.all(); // { a: 1, b: { c: 2, d: 3 } }
await db.get("b") // { c: 2, d: 3 }
await db.del("b");
await db.all(); // { "a": 1 }
`A more complex example with object types:
`ts
import { createOrbitDB, useDatabaseType } from "@orbitdb/core";
import { Nested } from "@orbitdb/nested-db";// Register nested database type. IMPORTANT - must call before creating orbit instance !
useDatabaseType(Nested);
const orbit = await createOrbitDB({ ipfs })
const db = await orbitdb.open({ type: "nested" });
await db.insert({ a: { b: 1 }, d: 3 });
await db.insert("a", { c: 2 });
const all = await db.all(); // { a: { b: 1, c: 2}, d: 3 }
``