Core APIs
List
Splice
1 min
osplits a given json list into two based on splice index and splice rows if the list has 5 rows and the splice index is 0 and splice rows is 3, then the output will have two lists first one will have the first 3 items and the second one will hold the remaining seven the function can be used to extract a range from anywhere in the list by configuring the splice index and splice rows accordingly note the splice index function is a zero based index which means that 0 refers to the first item in the list api definition { "tab" "examples", "url" "https //orca pathfix com/functions/list/splice", "name" "splice api", "method" "post", "request" { "pathparameters" \[], "queryparameters" \[], "headerparameters" \[], "bodydataparameters" \[], "formdataparameters" \[] }, "results" { "languages" \[ { "id" "28usdqyeh3qrdmtvamsqt", "code" "{\n \\"output\\" {\n \\"spliced\\" \[\n {\n \\"user id\\" \\"bruce\@pathfix com\\"\n }\n ],\n \\"processed\\" \[\n {\n\t\t\t\t\\"user id\\" \\"paul\@pathfix com\\"\n\t\t\t},\n\t\t\t{\n\t\t\t\t\\"user id\\" \\"chang\@pathfix com\\"\n\t\t\t}\n ]\n }\n}", "language" "200" }, { "id" "yix64dyiudpjgbrfsfawb", "code" "{\n \\"message\\" \\"error\\"\n}", "language" "404" } ], "selectedlanguageid" "28usdqyeh3qrdmtvamsqt" }, "examples" { "languages" \[ { "id" "encjz9tstg38f0x taa4x", "code" "{\r\n\t\\"input\\" \[\r\n\t\t{\r\n\t\t\t\\"user id\\" \\"bruce\@pathfix com\\"\r\n\t\t},\r\n\t\t{\r\n\t\t\t\\"user id\\" \\"paul\@pathfix com\\"\r\n\t\t},\r\n\t\t{\r\n\t\t\t\\"user id\\" \\"chang\@pathfix com\\"\r\n\t\t}\r\n\t],\r\n\t\\"splice index\\" \\"0\\",\r\n\t\\"splice rows\\" \\"1\\"\r\n}", "language" "json" } ], "selectedlanguageid" "encjz9tstg38f0x taa4x" }, "description" "\ncall the following api ", "currentnewparameter" { "label" "body parameter", "value" "bodydataparameters" } }