Last active
September 14, 2019 21:47
-
-
Save terrillo/c389015c12598266fbea32fad18f781e to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var TDB = new TelegraphDB("my-project-key", "us-east") | |
// Access Collection | |
var users = TDB.collection("users") | |
// Insert Data | |
users.insert([{ | |
"info": { | |
"first_name": "Jack", | |
"last_name": "Dorsey" | |
}, | |
"social": { | |
"twitter": "jack" | |
}, | |
"email": "jack@twitter.com" | |
}]) | |
// Find | |
var userData = users.find({ | |
"email": "jack@twitter.com" | |
}) | |
console.log(userData) | |
// [{"info":{"first_name":"Jack","last_name":"Dorsey"},"social":{"twitter":"jack"},"email":"jack@twitter.com"}] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment