Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/wix/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Javascript parse.com查询未显示返回的所有列_Javascript_Parse Platform - Fatal编程技术网

Javascript parse.com查询未显示返回的所有列

Javascript parse.com查询未显示返回的所有列,javascript,parse-platform,Javascript,Parse Platform,我正在构建一个与Parse.com API交互的javascript程序 我正在数据库中查询名为“inventory”的类,如下所示: var query = new Parse.Query("Inventory"); query.equalTo("user", $scope.user); query.equalTo("product", product); query.first({ s

我正在构建一个与Parse.com API交互的javascript程序

我正在数据库中查询名为“inventory”的类,如下所示:

var query = new Parse.Query("Inventory");

            query.equalTo("user", $scope.user);
            query.equalTo("product", product);

            query.first({
                success: function(results) {
                    if (results !== undefined) {
                        invId = results.id;
                        invQTY = results.QTY;
                        console.log(results);
                    };
                },
                error: function(object, error) {
                    console.log(error.message);
                }
            });
invQTY = results.get("QTY");
查询正在查找正确的result.id。我现在要做的是导入与找到的行关联的列(数量)

我注意到结果不包含以下内容:

o {className: "Inventory", _objCount: 18, id: "uvEDwOo823"}

这就是为什么我的
invQTY=results.QTY不起作用,但我很困惑如何才能为所选结果提取这些信息?

我自己已经找到了这个答案。我需要将invQTY更改为如下所示:

var query = new Parse.Query("Inventory");

            query.equalTo("user", $scope.user);
            query.equalTo("product", product);

            query.first({
                success: function(results) {
                    if (results !== undefined) {
                        invId = results.id;
                        invQTY = results.QTY;
                        console.log(results);
                    };
                },
                error: function(object, error) {
                    console.log(error.message);
                }
            });
invQTY = results.get("QTY");