Skip to content

adaxi/Flat

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

32 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Flat

Build Status Codacy Badge Coverage Status Coverage Status

This library flattens JSON files.

Before:

{
	"key1": {
		"keyA": "valueI"
	},
	"key2": {
		"keyB": "valueII"
	},
	"key3": { "a": { "b": { "c": 2 } } }
}

After:

{
   "key1.keyA": "valueI",
   "key2.keyB": "valueII",
   "key3.a.b.c": 2
}

The library can do the reverse operation as well: unflatten.

Use the library

The documentation page lists how you can add this library as a dependency of your project.

Credit

Based on the work of Jeffrey Blattman. Created to be compatible with NPM flat.

About

Flatten JSON objects

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages