Skip to content

Latest commit

 

History

History
30 lines (19 loc) · 864 Bytes

kibana-plugin-core-public.getflattenedobject.md

File metadata and controls

30 lines (19 loc) · 864 Bytes

Home > kibana-plugin-core-public > getFlattenedObject

getFlattenedObject() function

Flattens a deeply nested object to a map of dot-separated paths pointing to all primitive values **and arrays** from rootValue.

example: getFlattenedObject({ a: { b: 1, c: [2,3] } }) // => { 'a.b': 1, 'a.c': [2,3] }

Signature:

export declare function getFlattenedObject(rootValue: Record<string, any>): {
    [key: string]: any;
};

Parameters

Parameter Type Description
rootValue Record<string, any>

Returns:

{ [key: string]: any; }