VarunOriginal post
Web Developer
Normal Output:
JavaScript
"questions": { "total": 2, "documents": [ { "order": 1, "$id": "quiz_question_1", "questionId": { "$id": "question_1", "$databaseId": "...", "$collectionId": "..." } }, { "order": 2, "$id": "quiz_question_2", "questionId": { "$id": "question_2", "$databaseId": "...", "$collectionId": "..." } } ] }but if i do
JavaScript
Query.select(["question", "order"]);it throws an error
Bash
AppwriteException: Cannot select attributes: questionIdJavaScript
code: 400,type: 'general_query_invalid',response: { message: 'Cannot select attributes: questionId', code: 400, type: 'general_query_invalid', version: '1.6.0'}Summary
Developers are encountering an issue with `Query.select()` not handling nested attributes like `questionId` directly. The suggested workaround is to fetch the entire document and filter out the necessary fields in the application logic. Attempting to select nested attributes directly leads to an error.