Can somebody explain the 'fields' parameter

In the API docs for getting all items in a Collection. The more advanced POST version has a bunch of example parameters.

What does this mean - fields: {fieldA: 1, fieldB: 1},

…to be more precise, what do the 1s mean? I just want to return a subset of the available fields in this case.

Was just doing some digging myself, and stumbled on this thread.

raffaelj
Your response will only have “fieldA” and “fieldB” (and “_id”), “fieldC” etc. will be skipped. The 1 means true . In the post body, you can write it in boolen, the get request needs 1 or 0.