Examples
Flat output with mapping
1import { convertObject } from "hbh-nodes";3const data = {4 user: { name: "Alice", age: 25 },5 settings: { theme: "dark" }6};8const result = convertObject(data, {9 outputFormat: 'flat',10 mapFn: (v, k) => String(v).toUpperCase()11});13console.log(result);14
Tree output with filtering
1const tree = convertObject(data, {2 outputFormat: 'tree',3 filterFn: (val, key) => typeof val === 'string'4});6console.log(tree);78910
Nested keys output
1const keys = convertObject(data, { outputFormat: 'nestedKeys' });2console.log(keys);3