import { flatKeys } from "https://deno.land/x/ayonli_jsext@v0.9.72/esm/object.js";
Create an object with flatted keys of the original object, the children nodes' properties will be transformed to a string-represented path.
NOTE: This function only operates on plain objects and arrays.
Examples
Example 1
Example 1
import { flatKeys } from "@ayonli/jsext/object";
const obj = flatKeys({ foo: { bar: "Hello", baz: "World" } });
console.log(obj); // { "foo.bar": "Hello", "foo.baz": "World" }