1.0.5 • Published 10 years ago

jsontile v1.0.5

Weekly downloads
1
License
MIT
Repository
github
Last release
10 years ago

jsontile

JsonTile is a util for transform the json format

Install

NPM

$ npm install jsontile

Usages

var jsontile = require('jsontile')
var obj={
	a:1,
	b:[
		{c:"2"},
		{d:"3"}
	]
}
obj=jsontile(obj)
console.log(obj)
//will get { a: 1, 'b.0.c': '2', 'b.0.d': '3' }

Examples

It is useful for deal with http query,just like:

var querystring=require('querystring')
var jsontile = require('jsontile')
var obj={
	a:1,
	b:[
		{c:"2"},
		{d:"3"}
	]
}
var str=querystring.stringify(jsontile(obj))
console.log(str)
//will get 'a=1&b.0.c=2&b.0.d=3'

It is easy to append json info on http get request

1.0.5

10 years ago

1.0.4

10 years ago

1.0.3

10 years ago

1.0.2

10 years ago

1.0.1

10 years ago

1.0.0

10 years ago