0.2.6 • Published 7 years ago

1tree-json v0.2.6

Weekly downloads
41
License
MIT
Repository
github
Last release
7 years ago

1tree-json

Allows conversion between JSON objects and 1tree instances

const JsonTree = require( '1tree-json' )

const jsonData = require( './test-data.json' )

const tree = JsonTree( jsonData )

const numbers = tree.findAll( node => node.isNumber() )

numbers.forEach( numberNode => {
  const value = node.value()

  value.nodeValue *= 2

  node.value( value )
})

const newData = tree.toJson()

console.log( JSON.stringify( newData, null, 2 ) )
0.2.6

7 years ago

0.2.5

7 years ago

0.2.4

7 years ago

0.2.3

7 years ago

0.2.2

7 years ago

0.2.1

7 years ago

0.2.0

7 years ago

0.1.10

7 years ago

0.1.9

7 years ago

0.1.8

7 years ago

0.1.7

7 years ago

0.1.6

7 years ago

0.1.5

7 years ago

0.1.4

7 years ago

0.1.3

7 years ago

0.1.2

7 years ago

0.1.1

7 years ago

0.1.0

7 years ago