balderdashy / balderdashy/sails

How to check field is empty or not if field type is array ?

Open
#6,992 2 comments 0 reactions 0 assignees View on GitHub
orm question try this out please
Dominant language
JavaScript
Stars
22.8k
Forks
1.9k
PR merge metrics
No merged PRs in 30d

Description

Hello Sir,

I have using latest sails js. My problem is in my collection some fields contain array So How I checked field is not empty in query..

Example : Sample Json
{
"_id" : ObjectId("5d5453e4488c744ab34b7946"),
"is_verified" : [],
"uploaded_files" : :[ {
"is_data" : "1"
}],
}

In above code How to query for "uploaded_files" field is not empty in sails js...

Please help me !

Contributor guide

Open the contributing guide

Research direction

No repository file, test, or entry point is mentioned. Start by checking the Sails.js query documentation and the relevant collection adapter for array-field queries; confirm the expected behavior for a non-empty uploaded_files field and document a supported query example if the project lacks one.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, node.js
Domain
backend, database
Issue type
Documentation
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
20/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.