Compress an object into string notation. Used with TeDB's indexing
Example
const doc = { nested: { obj: { is: "full", }, num: 3, }, tgt: [1, 2], } const target: any = {}; compressObj(doc, target); console.log(target); // { // "nested.obj.is": "full", // "nested.num": 3, // "tgt.0": 1, // "tgt.1": 2, // }
Generated using TypeDoc
Compress an object into string notation. Used with TeDB's indexing
Example
const doc = { nested: { obj: { is: "full", }, num: 3, }, tgt: [1, 2], } const target: any = {}; compressObj(doc, target); console.log(target); // { // "nested.obj.is": "full", // "nested.num": 3, // "tgt.0": 1, // "tgt.1": 2, // }