Skip to content
M ABD AZIZ ALFIAN edited this page Nov 3, 2019 · 21 revisions

Welcome to the fly-json-db wiki!

Sorry, We still in progress to update this Wiki.

Getting Started

For the first time, you have no any data, so we going to insert a data first.

const DB = require('fly-json-db');

// example data json array
var data1 = [
  {user_id:1,name:"budi",age:10},
  {user_id:5,name:"wawan",age:20},
  {user_id:3,name:"tono",age:30}
];

// Saving above json array into database
var nosql = new DB();
  nosql.loadArray(data1).then(data => {
    nosql.save('path/to/file.nosql').then(data => {
      console.log(data);
    });
  });
Clone this wiki locally