We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 5060278 commit 95872bfCopy full SHA for 95872bf
packages/json-map-keys/README.md
@@ -1,13 +1,16 @@
1
# json-map-keys
2
3
-> Replace json values with the key path.
+Replace object values with the full keys path.
4
5
Example:
6
7
```json
8
{
9
- "a": {
10
- "b": "Text Note"
+ "foo": {
+ "bar": "Bar value",
11
+ "baz": {
12
+ "qux": 1234
13
+ }
14
}
15
16
```
@@ -16,16 +19,25 @@ Will generate
19
17
20
18
21
- "b": "a.b"
22
23
+ "bar": "foo.bar",
24
25
+ "qux": "foo.baz.qux"
26
27
28
29
30
31
+## Install
32
+
33
+```sh
34
+npm install json-map-keys --save
35
+```
36
37
## Usage
38
39
```js
-import mapKeys from 'json-map-keys'
40
+import { jsonMapKeys } from 'json-map-keys'
41
42
const data = { a: { b: 'Text Note' } }
43
// Result { a: { b: 'a.b' } }
0 commit comments