0

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

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.

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

2
  • That doesn't look like JavaScript Commented Nov 3, 2015 at 23:28
  • This is a downside to the "object" data type. Whether in an array or singularly, you can't specify queries based upon the content of objects. Idea 1: maybe BoxData can be made a first-class parse object, Idea 2: reduce the query results with some other criteria, then search the box data arrays in app code. Commented Nov 3, 2015 at 23:29

1 Answer 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

Sign up to request clarification or add additional context in comments.

1 Comment

Appreciate the answer. It would be useful if it worked.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.