Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Don't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.

Reply
Anonymous
Not applicable

JSON Pagination based on has_more

I have a JSON WEB Document that, when there is no limiting, it brings me the following values:

{"data":[{"index":5,"value":"F"},{"index":6,"value":"G"},{"index":7,"value":"H"},{"index":8,"value":"I"},{"index":9,"value":"J"},{"index":10,"value":"K"},{"index":11,"value":"L"},{"index":12,"value":"M"},{"index":13,"value":"N"},{"index":14,"value":"O"},{"index":15,"value":"P"},{"index":16,"value":"Q"},{"index":17,"value":"R"},{"index":18,"value":"S"},{"index":19,"value":"T"},{"index":20,"value":"U"},{"index":21,"value":"V"},{"index":22,"value":"W"},{"index":23,"value":"X"},{"index":24,"value":"Y"},{"index":25,"value":"Z"}],"has_more":false}

When I limit the query to five values, it brings me the following JSON:

{"data":[{"index":0,"value":"A"},{"index":1,"value":"B"},{"index":2,"value":"C"},{"index":3,"value":"D"},{"index":4,"value":"E"}],"has_more":true}

So, when there is more data below the last value, the "has_more" returns TRUE, and when there is not, it returns FALSE. I have a statement start_at (which index number should the query start), and another limit, that I can maybe use to paginate and create functions based on the value of has_more.

The result should bring the 25 values, but each query list should not have more than 5 values. 

0 REPLIES 0

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.

Top Kudoed Authors