Firebase.jsonToString()

Firebase reads data as a JSON object. You can convert this to a string with this machine.

This will parse your data from a JSON Object into a string.

Usage

Hover over inputs/exits for more info.

var Firebase = require('machinepack-firebase');


// Firebase reads data as a JSON object. You can convert this to a string with this machine.

Firebase.jsonToString({

object: '{ "User 1": {"email": "user@gmail.com", "password": "password123"}}',

}).exec({

// An unexpected error occurred.

error: function (err) {

 

},

// The data provided is not a valid JSON object.

parseFailure: function () {

 

},

// OK.

success: function () {

 

},

});

Inputs

object required

The object you wish to convert into a string.

'{ "User 1": {"email": "user@gmail.com", "password": "password123"}}'

Exits

error

An unexpected error occurred.

parseFailure

The data provided is not a valid JSON object.

success

OK.