Parse & JS: Retrieving object using objectid

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

If you have the objectId, you can retrieve a single Parse.Object using a Parse.Query.

<!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>objectid not found</h1>

    <div style='display:none' class='success'>
        <h1>Successfully found the objectid</h1>

    Parse.initialize('5d3sro43zBGj8AMYqWND5bFYMzAan7f5P5euZm7M', 'hlRZZqAylA7Fmah4Kk6ma8WK7QCT4cHrxjafnnkI');
    var MovieObject = Parse.Object.extend('MovieObject');
    var movieObject = new MovieObject();

    var query = new Parse.Query(MovieObject);
    query.get('KpM9EZvArG', {
        success: function (movieObject) {
        error: function (movieObject, error) {


Try The Code

We first pass the objectid into query.get and once the object is found, we can retrieve other key value of the object or record.

In this example, the value of the titleName key is retrieved by

Series Navigation<< Parse & JS: Insert a record using save method
Parse & JS: Retrieving the 3 special values using objectid >>

Leave a comment

Leave a Reply