Parse.com查询对象数组中的子对象键

时间:2021-10-26 17:01:59

A Parse class has a column labeled BoxData and is an Array type. Each value for that BoxData column is an array of objects.

Parse类有一个标记为BoxData的列,是一个Array类型。 BoxData列的每个值都是一个对象数组。

BoxData (Array)
BoxData value1 = [{"boxID":"1","boxWeight":"12kg"},{"boxID":"4","boxWeight":"12kg"}]
BoxData value2 = [{"boxID":"12","boxWeight":"12kg"},{"boxID":"24","boxWeight":"12kg"}]
BoxData value3 = [{"boxID":"123","boxWeight":"12kg"},{"boxID":"124","boxWeight":"12kg"}]

equalTo("BoxData.boxID","124") does not work.

equalTo(“BoxData.boxID”,“124”)不起作用。

How should a Parse Javascript SDK query be written with constraints if trying to return all rows where boxID=124 ?

如果尝试返回boxID = 124的所有行,如何使用约束编写Parse Javascript SDK查询?

1 个解决方案

#1


0  

You can't use dot notation with Array or Dictionary types. This feature can only be used with Pointer types.

您不能对数组或字典类型使用点表示法。此功能只能与指针类型一起使用。

https://parse.com/questions/includekey-dot-notation-doesnt-work-on-arrays

#1


0  

You can't use dot notation with Array or Dictionary types. This feature can only be used with Pointer types.

您不能对数组或字典类型使用点表示法。此功能只能与指针类型一起使用。

https://parse.com/questions/includekey-dot-notation-doesnt-work-on-arrays