gpt4 book ai didi

javascript - Parse.com javascript 中指针的值

转载 作者:行者123 更新时间:2023-12-03 10:11:09 25 4
gpt4 key购买 nike

我的一个 Parse.com 数据存储对象中有一个指针。我需要从中提取 objectId 。这是我的云代码中的 json Customer 对象:

"Customer":{"__type":"Pointer","className":"_User","objectId":"oowk8Vgcyg"},

我试过了

var customer = request.object.get("Customer")

这会打印出[object Object]

现在我如何从中获取objectId?我试过了

customer.objectId

customer[objectId]

customer["objectId"]

或者各种带引号或不带引号的

customer.get(objectId)

但没有一个有效。正确的语法是什么?

最佳答案

尝试使用customer.id

Parse 对象看起来与您发送的 JSON 不同。

https://www.parse.com/docs/js/guide#objects-retrieving-objects

关于javascript - Parse.com javascript 中指针的值,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/30108514/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com