Object.flatten >= 0.1.2

Purpose

Flatten an object

Syntax

Object.flatten ( Objectobj );

Parameters

obj
The object to flatten

Return values

Object

Examples

var obj = {
	one: 1,
	settings: {
		two: 2,
		sub: {
			three: 3
		}
	}
};

Object.flatten(obj);>>> Object {"one": 1, "settings.two": 2, "settings.sub.three": 3}