Update snippet descriptions

This commit is contained in:
Isabelle Viktoria Maciohsek
2020-10-19 18:51:03 +03:00
parent f0fbe0c3e5
commit 5e8e6f51a3
36 changed files with 97 additions and 82 deletions

View File

@ -1,9 +1,9 @@
---
title: flattenObject
tags: object,recursion,intermediate
tags: object,recursion,advanced
---
Flatten an object with the paths for keys.
Flattens an object with the paths for keys.
- Use recursion.
- Use `Object.keys(obj)` combined with `Array.prototype.reduce()` to convert every leaf node to a flattened path node.