cancel
Showing results for 
Search instead for 
Did you mean: 

How to get the first element in doc

khanh_tran
New Contributor II

I have output doc as the below picture
Screen Shot 2021-10-04 at 16.07.00
How can I get the first element from the doc?
Screen Shot 2021-10-04 at 16.09.29

1 ACCEPTED SOLUTION

SpiroTaleski
Valued Contributor

@khanh_tran

You can either:

  • Use Head Snap with “Number of documents” = 1 and “Documents offset” = 0

  • Use Filter Snap with following expr: snap.in.totalCount == 1

Regards,
Spiro Taleski

View solution in original post

1 REPLY 1

SpiroTaleski
Valued Contributor

@khanh_tran

You can either:

  • Use Head Snap with “Number of documents” = 1 and “Documents offset” = 0

  • Use Filter Snap with following expr: snap.in.totalCount == 1

Regards,
Spiro Taleski