On mongodb api "getRecords()", can i get meta data count as the only response?

Hello!

On mongodb api “getRecords()”, can i get meta data count as the only response? or can I write a script to do that? if anyone know how I can filter or remove resource completely with its response it would be great, thanks! Because I kept getting all or list of filtered id records along with metadata with count.

thanks,

Ivan

It looks like MongoDB doesn’t support Stored Procedures, which would have been my first suggestion.

As an alternative, you can call getRecords() with include_count=true and offset=1000000000 or some other very large number (compared to your expected table size). It’s very hacky, so hopefully someone can come up with a better solution.

I will give it a try mlucas thanks!

hi all
my post will maybe be ridiculous, because i’ve maybe misunderstood,
but

as you wil get a json as a result (called response for example)

response.lenght will be your count

jb

1 Like