Core APIs
List
Convert to Paged List
1 min
splits a given json list into pages based on page size if the list has 12 rows and the page index is 5 , then the output will have 3 lists first one will have the first 5 items, second one will have 5 items and the third will hold the remaining 2 the function can be used to convert a large list to be used in a paged list api definition { "tab" "examples", "url" "https //orca pathfix com/functions/list/topages", "name" "convert to paged list api", "method" "post", "request" { "pathparameters" \[], "queryparameters" \[], "headerparameters" \[], "bodydataparameters" \[], "formdataparameters" \[] }, "results" { "languages" \[ { "id" "28usdqyeh3qrdmtvamsqt", "code" "{\n \\"output\\" \[\n \[\n {\n \\"item\\" 1\n },\n {\n \\"item\\" 2\n },\n {\n \\"item\\" 3\n },\n {\n \\"item\\" 4\n },\n {\n \\"item\\" 5\n }\n ],\n \[\n {\n \\"item\\" 6\n },\n {\n \\"item\\" 7\n },\n {\n \\"item\\" 8\n },\n {\n \\"item\\" 9\n },\n {\n \\"item\\" 10\n }\n ],\n \[\n {\n \\"item\\" 11\n },\n {\n \\"item\\" 12\n }\n ]\n ],\n \\"size in bytes\\" 313 0\n}", "language" "200" }, { "id" "yix64dyiudpjgbrfsfawb", "code" "{\n \\"message\\" \\"error\\"\n}", "language" "404" } ], "selectedlanguageid" "28usdqyeh3qrdmtvamsqt" }, "examples" { "languages" \[ { "id" "encjz9tstg38f0x taa4x", "code" "{\n \\"page size\\" 5,\n \\"input\\" \[\n {\n \\"item\\" 1\n },\n {\n \\"item\\" 2\n },\n {\n \\"item\\" 3\n },\n {\n \\"item\\" 4\n },\n {\n \\"item\\" 5\n },\n {\n \\"item\\" 6\n },\n {\n \\"item\\" 7\n },\n {\n \\"item\\" 8\n },\n {\n \\"item\\" 9\n },\n {\n \\"item\\" 10\n },\n {\n \\"item\\" 11\n },\n {\n \\"item\\" 12\n }\n ]\n}", "language" "json" } ], "selectedlanguageid" "encjz9tstg38f0x taa4x" }, "description" "\ncall the following api ", "currentnewparameter" { "label" "body parameter", "value" "bodydataparameters" } }