0

I have an array field called "friends" on my _User table that has pointers to other users in the _User table. If I were to make a REST GET on _Users, what query would give me all the friends for a given user?

1 Answer 1

1

This is covered in the documentation on REST API, Queries, Relational Queries.

Basically you just need to add an include=friends to the url.

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

2 Comments

This is really weird – I've had very unreliable results with include and includeKey...sometimes include works and sometimes includeKey works... parse.com/questions/help-with-a-simple-relational-query led me to believe that includeKey was the correct param to use, but then after working for a while, includeKey started failing in that only the first record in that array would be turned into an object – the others would be pointers..Have you had issues with this? Is there something I should look into to make it more reliable? Any help is much appreciated. Thanks!
I don't use the REST API myself, my main focus is on the JavaScript API.

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.