Parse & JS: Database table

This entry is part 5 of 25 in the series Parse & Javascript


As in the above screenshot, the TestObject is a class in Parse.  In a normal database like MySQL, it will be called a table.  You can always add a class/table by clicking on+New Class.

<!doctype html>
    <title>My Parse App</title>
    <script type='text/javascript' src=''></script>
    <script type='text/javascript' src=''></script>


    <div style='display:none' class='error'>
        <h1>Failed to connect to Parse database</h1>

    <div style='display:none' class='success'>
        <h1>Successfully connected to parse database and insert a record</h1>

    Parse.initialize('5d3sro43zBGj8AMYqWND5bFYMzAan7f5P5euZm7M', 'hlRZZqAylA7Fmah4Kk6ma8WK7QCT4cHrxjafnnkI');
    var TestObject = Parse.Object.extend('TestObject');
    var testObject = new TestObject();{foo: 'bar'}, {
        success: function (object) {
        error: function (model, error) {

Try The Code

The first time you run the above code, the class TestObject will be lazily created.  The first record foo: ‘bar’ will be inserted as well.

The second time you run the code, the second record foo: ‘bar’ will be inserted.

Series Navigation<< Parse & JS: Parse object
Parse & JS: Objects and records >>