Search code examples
javascriptparse-platformparse-cloud-code

How to get the column of parse.com class?


I trying to use Cloud Code to get class's data.

And there are my questions.

Q:In this photo,how do I get the score column?

there is my code.

var object = [];
var pushQuery = new Parse.Query('Meeting');
pushQuery.find({
success: function(results) {
                success: function(results) {
                        for (var i = 0; i < results.length; i++) {
                                object[i] = results[i];
                        }
                },
                error: function(error) {
                }
        });


Solution

  • You can get column from parse one of following ways.

     results[i].get("columnName").
    

    or

    results[i].ansId //replace ansId with your column name.